/* ==========================
   Main Container
========================== */
.itp-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #1e293b;
}

/* ==========================
   Header
========================== */
.itp-header {
    text-align: center;
    margin-bottom: 20px;
    padding-top: 10px;
}

.itp-header h1 {
    font-size: 28px;
    margin-bottom: 5px;
    color: #2563eb;
}

.itp-header p {
    font-size: 14px;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================
   Cards
========================== */
.itp-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 10px 25px rgba(0,0,0,.05);
    transition: .3s;
}

.itp-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 35px rgba(0,0,0,.08);
}

.itp-card h4 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #1e293b;
    font-size: 18px;
}

/* ==========================
   Upload Area
========================== */
#dropArea {
    border: 2px dashed #93c5fd;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    background: #f8fbff;
    transition: .3s;
    cursor: pointer;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#dropArea:hover {
    border-color: #2563eb;
    background: #eef6ff;
}

#dropArea.drag-over {
    border-color: #2563eb;
    background: #dbeafe;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.upload-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.upload-subtitle {
    font-size: 14px;
    margin-bottom: 15px;
    color: #64748b;
}

#dropArea small {
    margin-top: 10px;
    font-size: 12px;
    color: #64748b;
}

/* ==========================
   Buttons
========================== */
.itp-btn {
    background: #2563eb;
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: .3s;
}

.itp-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.itp-btn:active {
    transform: scale(.98);
}

.itp-btn-secondary {
    background: #64748b;
}

.itp-btn-secondary:hover {
    background: #475569;
}

.itp-btn-success {
    background: #10b981;
}

.itp-btn-success:hover {
    background: #059669;
}

.itp-btn-danger {
    background: #ef4444;
}

.itp-btn-danger:hover {
    background: #dc2626;
}

.itp-btn-block {
    width: 100%;
}

/* ==========================
   Form Groups
========================== */
.itp-form-group {
    margin-bottom: 20px;
}

.itp-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
}

.itp-form-group input,
.itp-form-group select {
    width: 100%;
    height: 52px;
    padding: 0 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 16px;
    box-sizing: border-box;
    transition: .3s;
}

.itp-form-group input:focus,
.itp-form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

/* ==========================
   Grid Layouts
========================== */
.itp-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.itp-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.itp-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

/* ==========================
   Info Grid
========================== */
.itp-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.itp-info-item {
    background: #f8fafc;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.itp-info-item strong {
    display: block;
    margin-bottom: 5px;
    color: #2563eb;
    font-size: 14px;
}

.itp-info-item span {
    font-size: 18px;
    font-weight: 600;
}

/* ==========================
   Canvas
========================== */
.itp-canvas-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.itp-canvas-wrapper canvas {
    max-width: 100%;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

/* ==========================
   Preview Image
========================== */
.itp-preview {
    display: block;
    max-width: 100%;
    max-height: 400px;
    margin: 15px auto;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

/* ==========================
   Crop Coordinates
========================== */
.itp-coords {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 15px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 10px;
}

.itp-coords span {
    font-size: 14px;
    color: #64748b;
}

.itp-coords span strong {
    color: #1e293b;
}

/* ==========================
   Keyboard Shortcuts
========================== */
.itp-shortcuts {
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 10px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
}

.itp-shortcuts kbd {
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #1e293b;
}

/* ==========================
   Hidden Utility
========================== */
.itp-hidden {
    display: none !important;
}

/* ==========================
   Responsive
========================== */
@media (max-width: 768px) {
    .itp-grid-2,
    .itp-grid-3,
    .itp-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .itp-header h1 {
        font-size: 28px;
    }
    
    .itp-info-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    #dropArea {
        min-height: 150px;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .itp-info-grid {
        grid-template-columns: 1fr;
    }
    
    .itp-container {
        padding: 10px;
        margin: 20px auto;
    }
}
/* Background Remover Color Buttons */
.bg-color-btn {
    transition: all 0.3s ease;
}

.bg-color-btn:hover {
    transform: scale(1.1);
}

.bg-color-btn.active {
    border-color: #2563eb !important;
    border-width: 3px !important;
}

/* Converter specific */
#convertFormat {
    width: 100%;
    height: 52px;
    padding: 0 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 16px;
    box-sizing: border-box;
    background: #fff;
}

/* Success message */
.itp-success-msg {
    background: #d1fae5;
    color: #065f46;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
    text-align: center;
    font-weight: bold;
}
/* ==========================
   Reduce Header Space
========================== */
.itp-header {
    margin-bottom: 15px !important;
    padding-top: 5px !important;
}

.itp-header h1 {
    font-size: 24px !important;
    margin-bottom: 3px !important;
}

.itp-header p {
    font-size: 13px !important;
    margin: 0 !important;
}

.itp-container {
    margin: 15px auto !important;
    padding: 15px !important;
}

.itp-card {
    padding: 20px !important;
    margin-bottom: 15px !important;
}

#dropArea {
    min-height: 150px !important;
    padding: 20px !important;
}
/* Fix for Resizer Drop Area */
#dropArea {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 30px 20px !important;
    min-height: 180px !important;
}