:root {
    --bg: linear-gradient(135deg, #fefeff, #f6f8fa);
    --card-bg: #fffdfd;
    --compare-bg: #fffafa;
    --text: #222;
    --card-shadow: rgba(0,0,0,0.08);
    --primary: #00c2ff;
    --secondary: #3a7afe;
}

[data-theme="dark"] {
    --bg: #0f172a;
    --card-bg: #0f1018;
    --compare-bg: #0f172a;
    --text: #e5e7eb;
    --card-shadow: rgba(97, 97, 97, 0.08);
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 400;
    direction: rtl;
    min-height: 100vh;
    margin: 0;
    line-height: 1.6;
    font-size: 1rem; /* پایه استاندارد */
    box-sizing: border-box;
}

/* Navbar */
#nav-bar {
    background: var(--card-bg);
    width: 35rem;
    height: 4rem; /* معادل 80px */
    margin: 0.625rem auto; /* 10px */
    padding: 0.625rem 2.5rem;
    position: relative;
    border-radius: 0.4375rem; /* 7px */
    box-shadow: 0 1.25rem 3.125rem var(--card-shadow); /* 0 20px 50px */
}

#nav-bar .icon {
    float: right;
    width: 20%;
    height: 2.5rem; /* 40px */
    line-height: 2.5rem;
    margin: 0.625rem; /* 10px */
    cursor: pointer;
    border: none;
    border-radius: 0.3125rem; /* 5px */
    transition: 0.1s;
}

#nav-bar div.icon.active {
    border-bottom: 0.125rem solid var(--primary); /* 2px */
}

.options select {
    border: none;
    border-bottom: 0.125rem solid #a0f4ff;
    border-radius: 0.3125rem;
}

/* Theme Toggle */
.theme-toggle { 
    position: absolute; 
    top: 22px; left: 20px; 
    width: 64px; 
    height: 34px; 
    border-radius: 34px; 
    background: #e5e7eb; 
    border: none; 
    cursor: pointer; 
    padding: 0; 
    transition: background 0.3s ease; 
} 

.theme-toggle .thumb { 
    position: absolute; 
    top: 3px; 
    left: 3px; 
    width: 28px; 
    height: 28px; 
    border-radius: 50%; 
    background: #fff; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.15); 
    transition: transform 0.35s ease; 
    z-index: 4; 
} 

.theme-toggle .icon { 
    position: absolute; 
    top: 25%; 
    transform: translateY(-50%); 
    font-size: 14px; 
    opacity: 0; 
    transition: opacity 0.3s ease; 
    z-index: 5; 
} 

.theme-toggle .sun { 
    left: 5px; 
    opacity: 1; 
} 

.theme-toggle .moon { 
    right: 0; 
} 

body[data-theme="dark"] .theme-toggle { 
    background: #1f2937; 
} 

body[data-theme="dark"] .theme-toggle .thumb { 
    transform: translateX(30px); 
} 

body[data-theme="dark"] .theme-toggle .sun { 
    opacity: 0; 
} 

body[data-theme="dark"] .theme-toggle .moon { 
    opacity: 1; 
} 

/* Container & Card */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.875rem; /* 30px */
}

.card {
    background: var(--card-bg);
    width: 35rem;
    padding: 2.5rem;
    border-radius: 0.4375rem;
    box-shadow: 0 1.25rem 3.125rem var(--card-shadow);
    text-align: center;
}

/* Headings */
.logo {
    width: 100%;
}

h1 {
    font-size: 1.375rem; /* 22px */
    margin-bottom: 0.5rem; /* 8px */
}

.subtitle {
    color: #666;
    margin-bottom: 1.875rem; /* 30px */
}

/* Drop Zone */
#drop-zone {
    border: 0.125rem dashed #a0f4ff;
    border-radius: 0.9375rem; /* 15px */
    padding: 2.5rem;
    transition: 0.3s;
}

#drop-zone.dragover {
    background: #f0fcff;
    border-color: var(--primary);
}

#drop-zone p {
    font-size: 1rem; /* 16px */
    margin-bottom: 0.625rem; /* 10px */
}

#drop-zone span {
    color: #aaa;
    display: block;
    margin-bottom: 0.625rem;
}

.browse-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    padding: 0.625rem 1.5625rem; /* 10px 25px */
    border-radius: 1.875rem; /* 30px */
    cursor: pointer;
    display: inline-block;
}

/* Progress */
.progress-wrapper {
    margin-top: 1.5625rem; /* 25px */
}

.progress-bar {
    width: 100%;
    background: #eee;
    border-radius: 1.875rem;
    overflow: hidden;
    height: 0.75rem; /* 12px */
}

.progress {
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transition: width 0.3s;
}

.progress-text {
    display: block;
    margin-top: 0.625rem; /* 10px */
    font-size: 0.8125rem; /* 13px */
    color: #666;
}

/* Result */
.result-card {
    margin-top: 1.25rem; /* 20px */
    padding: 0.9375rem; /* 15px */
    border-radius: 0.75rem; /* 12px */
    background: var(--compare-bg);
    box-shadow: 0 0.625rem 1.5625rem rgba(0,0,0,0.05);
    position: relative;
}

.result-card img {
    width: 48%;
    border-radius: 0.5rem; /* 8px */
}

.images {
    display: flex;
    gap: 4%;
    margin-top: 0.625rem;
}

.removeThis {
    position: absolute;
    top: 0.9375rem;
    right: 0.9375rem;
    cursor: pointer;
}

.compare {
    display: flex;
    gap: 1.25rem; /* 20px */
    margin-top: 0.9375rem;
}

.compare div {
    flex: 1;
}

.compare img {
    width: 100%;
    border-radius: 0.625rem; /* 10px */
    margin-bottom: 0.3125rem; /* 5px */
}

.download-btn {
    display: inline-block;
    margin-top: 1.25rem;
    background: var(--primary);
    color: #fff;
    padding: 0.75rem 1.875rem;
    border-radius: 1.875rem;
    text-decoration: none;
}

/* Utils */
.hidden {
    display: none;
}
