/* 
 * Image Compressor Tool - Enhanced Professional Design
 * For Grey Pulse Tech
 */

/* Main Container */
.ict-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* Card Layout */
.ict-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #eaeaea;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ict-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.15);
}

/* Header */
.ict-header {
    padding: 50px 40px 40px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.ict-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.3;
    animation: float 20s linear infinite;
}

@keyframes float {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ict-header h2 {
    margin: 0 0 15px;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.ict-subtitle {
    margin: 0;
    opacity: 0.95;
    font-size: 18px;
    font-weight: 400;
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* Upload Area */
.ict-upload-area {
    padding: 70px 40px;
    text-align: center;
    border: 3px dashed #e2e8f0;
    margin: 40px;
    border-radius: 16px;
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.ict-upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ict-upload-area:hover {
    border-color: #4f46e5;
    background: linear-gradient(145deg, #f0f4ff, #e6edff);
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.1);
}

.ict-upload-area:hover::before {
    opacity: 1;
}

.ict-upload-area.dragover {
    border-color: #4f46e5;
    background: #e0e7ff;
    transform: translateY(-3px);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.2);
}

.ict-upload-area.dragover::before {
    opacity: 1;
}

.ict-upload-icon {
    margin: 0 auto 25px;
    color: #94a3b8;
    width: 90px;
    height: 90px;
    transition: all 0.3s ease;
}

.ict-upload-area:hover .ict-upload-icon {
    color: #4f46e5;
    transform: scale(1.1);
}

.ict-drag-text {
    font-size: 20px;
    color: #475569;
    margin-bottom: 25px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.ict-upload-area:hover .ict-drag-text {
    color: #334155;
}

.ict-file-info {
    font-size: 14px;
    color: #64748b;
    margin: 8px 0;
    transition: color 0.3s ease;
}

.ict-upload-area:hover .ict-file-info {
    color: #475569;
}

/* Buttons */
.ict-btn {
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    min-width: 150px;
    position: relative;
    overflow: hidden;
}

.ict-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.ict-btn:hover::before {
    left: 100%;
}

.ict-btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.ict-btn-primary:hover {
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
}

.ict-btn-compress {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
    min-width: 200px;
}

.ict-btn-compress:hover {
    background: linear-gradient(135deg, #0da271 0%, #047857 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

.ict-btn-secondary {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #475569;
    border: 2px solid #cbd5e1;
}

.ict-btn-secondary:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(203, 213, 225, 0.3);
}

.ict-btn-download {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    font-size: 18px;
    font-weight: 700;
    padding: 18px 40px;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    min-width: 250px;
}

.ict-btn-download:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

/* Controls */
.ict-controls {
    padding: 40px;
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
}

.ict-preview-section {
    margin-bottom: 40px;
}

.ict-preview-box {
    background: white;
    border-radius: 16px;
    padding: 30px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ict-preview-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.ict-preview-box h4 {
    margin: 0 0 20px;
    color: #334155;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ict-preview-box h4::before {
    content: '📷';
    font-size: 24px;
}

.ict-image-preview {
    width: 100%;
    min-height: 250px;
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: border-color 0.3s ease;
}

.ict-preview-box:hover .ict-image-preview {
    border-color: #c7d2fe;
}

.ict-image-preview img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Quality Selector */
.ict-quality-selector {
    margin: 40px 0;
}

.ict-quality-selector label {
    display: block;
    font-weight: 700;
    color: #334155;
    margin-bottom: 20px;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ict-quality-selector label::before {
    content: '⚙️';
    font-size: 24px;
}

.ict-quality-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.ict-quality-option {
    flex: 1;
    min-width: 180px;
    padding: 25px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ict-quality-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ict-quality-option:hover {
    border-color: #c7d2fe;
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.ict-quality-option.active {
    border-color: #4f46e5;
    background: linear-gradient(145deg, #eef2ff, #e0e7ff);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(79, 70, 229, 0.15);
}

.ict-quality-option.active::before {
    opacity: 1;
}

.ict-quality-label {
    font-size: 22px;
    font-weight: 800;
    color: #334155;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.ict-quality-option.active .ict-quality-label {
    color: #4f46e5;
}

.ict-quality-desc {
    font-size: 15px;
    color: #64748b;
    margin-bottom: 20px;
    font-weight: 500;
}

.ict-quality-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.ict-quality-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #3b82f6);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.ict-quality-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.3) 50%, 
        rgba(255,255,255,0) 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Action Buttons */
.ict-action-buttons {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Results */
.ict-results {
    padding: 40px;
    background: linear-gradient(145deg, #f0f9ff, #e6f4ff);
    border-top: 3px solid #3b82f6;
}

.ict-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 30px;
}

.ict-results-header h3 {
    margin: 0;
    color: #1e293b;
    font-size: 28px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 15px;
}

.ict-results-header h3::before {
    content: '📊';
    font-size: 32px;
}

.ict-stats {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.ict-stat {
    text-align: center;
    min-width: 140px;
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ict-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10b981, #3b82f6);
}

.ict-stat:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.ict-stat-label {
    display: block;
    font-size: 14px;
    color: #64748b;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.ict-stat-value {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: #10b981;
    line-height: 1;
}

/* Comparison */
.ict-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin: 50px 0;
    flex-wrap: wrap;
    position: relative;
}

.ict-comparison::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
    z-index: 0;
}

.ict-comparison-box {
    flex: 1;
    min-width: 320px;
    background: white;
    border-radius: 20px;
    padding: 35px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    text-align: center;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ict-comparison-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.ict-comparison-box h4 {
    margin: 0 0 25px;
    color: #475569;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.ict-comparison-box:first-child h4::before {
    content: '📤';
    font-size: 28px;
}

.ict-comparison-box:last-child h4::before {
    content: '📥';
    font-size: 28px;
}

.ict-file-details {
    margin-top: 25px;
    text-align: left;
    padding: 20px;
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.ict-file-details p {
    margin: 12px 0;
    color: #475569;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ict-file-details strong {
    color: #334155;
    font-weight: 600;
}

.ict-file-details span {
    font-weight: 700;
    color: #1e293b;
}

.ict-comparison-arrow {
    color: #94a3b8;
    font-size: 48px;
    animation: bounce 2s infinite;
    position: relative;
    z-index: 1;
    background: white;
    padding: 20px;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

@keyframes bounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

/* Download Section */
.ict-download-section {
    display: flex;
    gap: 20px;
    padding-top: 40px;
    border-top: 2px solid #e2e8f0;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 40px;
}

/* Messages */
.ict-messages {
    padding: 0 40px 30px;
}

.ict-message {
    padding: 20px 25px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-left: 5px solid;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ict-message.success {
    background: linear-gradient(145deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border-left-color: #10b981;
}

.ict-message.error {
    background: linear-gradient(145deg, #fee2e2, #fecaca);
    color: #991b1b;
    border-left-color: #ef4444;
}

.ict-message.warning {
    background: linear-gradient(145deg, #fef3c7, #fde68a);
    color: #92400e;
    border-left-color: #f59e0b;
}

.ict-message.info {
    background: linear-gradient(145deg, #dbeafe, #bfdbfe);
    color: #1e40af;
    border-left-color: #3b82f6;
}

/* Footer */
.ict-footer {
    padding: 35px 40px;
    text-align: center;
    background: linear-gradient(145deg, #1e293b, #0f172a);
    color: white;
    position: relative;
    overflow: hidden;
}

.ict-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #10b981);
}

.ict-branding {
    margin: 0 0 15px;
    color: #e2e8f0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.ict-tech-info {
    margin: 0;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Loading Spinner */
.ict-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Loading Overlay */
.ict-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ict-loading-content {
    text-align: center;
    background: white;
    padding: 50px;
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
    border: 1px solid #eaeaea;
    animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 400px;
    width: 90%;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.ict-loading-spinner {
    width: 70px;
    height: 70px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4f46e5;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
    margin: 0 auto 25px;
    position: relative;
}

.ict-loading-spinner::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 4px solid transparent;
    border-top: 4px solid #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite reverse;
}

.ict-loading-text {
    font-size: 20px;
    color: #475569;
    font-weight: 600;
    margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .ict-container {
        padding: 0 15px;
    }
    
    .ict-header,
    .ict-upload-area,
    .ict-controls,
    .ict-results {
        padding: 30px;
        margin: 20px;
    }
    
    .ict-upload-area {
        padding: 50px 30px;
    }
    
    .ict-header h2 {
        font-size: 30px;
    }
    
    .ict-subtitle {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .ict-container {
        margin: 20px auto;
    }
    
    .ict-card {
        border-radius: 16px;
    }
    
    .ict-header {
        padding: 40px 20px 30px;
    }
    
    .ict-header h2 {
        font-size: 26px;
    }
    
    .ict-upload-icon {
        width: 70px;
        height: 70px;
    }
    
    .ict-drag-text {
        font-size: 18px;
    }
    
    .ict-quality-options {
        flex-direction: column;
    }
    
    .ict-quality-option {
        min-width: 100%;
    }
    
    .ict-comparison {
        flex-direction: column;
        gap: 30px;
    }
    
    .ict-comparison::before {
        display: none;
    }
    
    .ict-comparison-arrow {
        transform: rotate(90deg);
    }
    
    .ict-comparison-box {
        width: 100%;
        min-width: auto;
    }
    
    .ict-stats {
        width: 100%;
        justify-content: space-around;
    }
    
    .ict-stat {
        min-width: 120px;
        padding: 20px;
    }
    
    .ict-stat-value {
        font-size: 28px;
    }
    
    .ict-action-buttons,
    .ict-download-section {
        flex-direction: column;
    }
    
    .ict-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .ict-header h2 {
        font-size: 22px;
    }
    
    .ict-subtitle {
        font-size: 14px;
    }
    
    .ict-upload-icon {
        width: 60px;
        height: 60px;
    }
    
    .ict-drag-text {
        font-size: 16px;
    }
    
    .ict-btn {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .ict-stat {
        min-width: 100px;
        padding: 15px;
    }
    
    .ict-stat-value {
        font-size: 24px;
    }
}

/* Floating Particles Animation */
.ict-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.ict-particle {
    position: absolute;
    background: rgba(79, 70, 229, 0.1);
    border-radius: 50%;
    animation: floatParticle 20s infinite linear;
}

@keyframes floatParticle {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100vw);
        opacity: 0;
    }
}

/* Add some particles to header */
.ict-header .ict-particle:nth-child(1) {
    width: 40px;
    height: 40px;
    top: 20%;
    left: 10%;
    animation-duration: 25s;
}

.ict-header .ict-particle:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 60%;
    left: 80%;
    animation-duration: 30s;
    animation-delay: 5s;
}

.ict-header .ict-particle:nth-child(3) {
    width: 30px;
    height: 30px;
    top: 80%;
    left: 20%;
    animation-duration: 35s;
    animation-delay: 10s;
}