/* ========================================
   Icon Resizer Modern Styles
   ======================================== */

:root {
    /* Modern Color Palette */
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --secondary-gradient: linear-gradient(135deg, #3b82f6 0%, #2dd4bf 100%);
    --surface-dark: #0f172a;
    --surface-card: rgba(30, 41, 59, 0.7);
    --surface-hover: rgba(51, 65, 85, 0.8);

    /* Glassmorphism Variables */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.15);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);

    /* Brand Colors */
    --android-color: #3ddc84;
    --ios-color: #0a84ff;

    /* Text Colors */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    /* Animations */
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ========================================
   Base & Layout
   ======================================== */
body {
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    color: var(--text-main);
    background-color: var(--surface-dark);
}

.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(168, 85, 247, 0.15) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* ========================================
   Language Switcher
   ======================================== */
.language-switch {
    position: absolute;
    top: 2rem;
    right: 2rem;
    z-index: 50;
}

.language-switch a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--glass-bg);
    border-radius: 100px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.language-switch a:hover {
    color: white;
    background: var(--glass-highlight);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* ========================================
   Header
   ======================================== */
.header {
    position: relative;
    text-align: center;
    margin-bottom: 4rem;
    padding-top: 6rem;
    animation: fadeInDown 0.8s var(--ease-out-back);
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.logo-icon {
    transition: transform 0.5s var(--ease-out-back);
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.3));
}

.logo-icon:hover {
    transform: scale(1.1) rotate(10deg);
}

.header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    line-height: 1.1;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ========================================
   Upload Section
   ======================================== */
.upload-section {
    margin-bottom: 4rem;
}

.upload-area {
    background: var(--glass-bg);
    border: 2px dashed var(--glass-border);
    border-radius: 32px;
    padding: 4rem 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: #6366f1;
    transform: translateY(-4px);
    box-shadow: var(--glass-shadow), 0 0 40px rgba(99, 102, 241, 0.2);
}

.upload-area:hover::before {
    opacity: 1;
}

.upload-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.upload-icon {
    color: var(--text-muted);
    transition: all 0.4s var(--ease-out-back);
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    margin-bottom: 0.5rem;
}

.upload-area:hover .upload-icon {
    color: #6366f1;
    transform: scale(1.1);
    background: rgba(99, 102, 241, 0.1);
}

.upload-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.upload-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin: 0;
}

.upload-hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    opacity: 0.6;
    margin-top: 1rem;
}

/* ========================================
   Buttons
   ======================================== */
.btn-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 16px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.btn-large {
    width: 100%;
    justify-content: center;
    padding: 1.25rem;
    font-size: 1.2rem;
    margin-top: 1rem;
}

/* ========================================
   Preview Section
   ======================================== */
.preview-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 2.5rem;
    backdrop-filter: blur(20px);
    box-shadow: var(--glass-shadow);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.preview-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.preview-image-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 24px;
    padding: 3rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 350px;
    border: 1px solid var(--glass-border);
}

.preview-image-container img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.preview-image-container img:hover {
    transform: scale(1.02);
}

.preview-info {
    display: flex;
    justify-content: space-between;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
}

/* ========================================
   Results Section
   ======================================== */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.results-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.platform-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    backdrop-filter: blur(20px);
    transition: transform 0.3s ease;
}

.platform-section:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: var(--glass-shadow);
}

.platform-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.platform-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.platform-icon.android {
    background: linear-gradient(135deg, rgba(61, 220, 132, 0.2) 0%, rgba(61, 220, 132, 0.1) 100%);
    color: var(--android-color);
    border: 1px solid rgba(61, 220, 132, 0.2);
}

.platform-icon.ios {
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.2) 0%, rgba(10, 132, 255, 0.1) 100%);
    color: var(--ios-color);
    border: 1px solid rgba(10, 132, 255, 0.2);
}

.platform-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    color: var(--text-main);
}

.platform-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* ========================================
   Icons Grid
   ======================================== */
.icons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
}

.icon-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-card:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.icon-preview {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
    border: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.icon-card:hover .icon-preview {
    border-color: rgba(255, 255, 255, 0.1);
}

.icon-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.icon-size {
    font-weight: 700;
    color: var(--text-main);
    font-size: 1rem;
    display: block;
    margin-bottom: 0.25rem;
}

.icon-name {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: block;
}

.icon-download {
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.icon-download:hover {
    background: var(--text-main);
    color: var(--surface-dark);
    border-color: var(--text-main);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    text-align: center;
    padding: 4rem 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
}

.footer a {
    color: var(--text-main);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.footer a:hover {
    opacity: 1;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2.5rem;
    }

    .container {
        padding: 1rem;
    }

    .upload-area {
        padding: 2rem 1rem;
    }

    .results-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .download-buttons {
        flex-direction: column;
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
    }
}