/* static/css/style.css - تم الماس‌های درخشان برای نوجوانان نخبه */

/* فونت Borna */
@import url("/static/fonts/borna/fontface.css");

/* متغیرهای رنگ - پالت درخشان الماس‌گونه */
:root {
    --primary-light: #FFFFFF;
    --secondary-light: #F5F7FF;
    --diamond-blue: #00C6FF;
    --diamond-purple: #9D4EDD;
    --diamond-pink: #FF2D75;
    --diamond-emerald: #00D99C;
    --diamond-gold: #FFC107;
    --diamond-silver: #E0E5FF;
    --text-primary: #1A237E;
    --text-secondary: #3949AB;
    --text-muted: #5C6BC0;
    --shadow-diamond: 0 10px 40px rgba(0, 198, 255, 0.25);
    --shadow-glow: 0 15px 50px rgba(157, 78, 221, 0.3);
    --border-diamond: 2px solid rgba(0, 198, 255, 0.3);
    --success-glow: #00D99C;
    --error-glow: #FF2D75;
    --card-bg: linear-gradient(145deg, #FFFFFF, #F0F4FF);
    --diamond-gradient: linear-gradient(135deg, var(--diamond-blue), var(--diamond-purple), var(--diamond-pink));
    --achievement-gradient: linear-gradient(135deg, var(--diamond-gold), var(--diamond-emerald));
    --art-gradient: linear-gradient(135deg, var(--diamond-pink), var(--diamond-purple));
    --science-gradient: linear-gradient(135deg, var(--diamond-blue), var(--diamond-emerald));
}

/* ریست و تنظیمات پایه */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Borna', 'Vazir', sans-serif;
}

body {
    background-color: var(--primary-light);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 198, 255, 0.1) 0%, transparent 25%),
        radial-gradient(circle at 90% 75%, rgba(157, 78, 221, 0.1) 0%, transparent 25%),
        radial-gradient(circle at 30% 50%, rgba(255, 193, 7, 0.08) 0%, transparent 30%),
        radial-gradient(circle at 70% 30%, rgba(0, 217, 156, 0.08) 0%, transparent 30%);
    min-height: 100vh;
    color: var(--text-primary);
    direction: rtl;
    overflow-x: hidden;
    position: relative;
    line-height: 1.7;
}

/* الماس‌های شناور در پس‌زمینه */
.diamond-bg {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
    font-size: 24px;
    animation: diamondFloat 20s linear infinite;
}

.diamond-bg:nth-child(1) { top: 10%; right: 5%; animation-delay: 0s; content: '🔶'; }
.diamond-bg:nth-child(2) { top: 20%; left: 10%; animation-delay: -5s; content: '🔷'; }
.diamond-bg:nth-child(3) { bottom: 30%; right: 15%; animation-delay: -10s; content: '💎'; }
.diamond-bg:nth-child(4) { bottom: 20%; left: 5%; animation-delay: -15s; content: '✨'; }
.diamond-bg:nth-child(5) { top: 50%; left: 20%; animation-delay: -7s; content: '🔸'; }

/* انیمیشن‌های پرانرژی و درخشان */
@keyframes diamondFloat {
    0%, 100% { 
        transform: translateY(0) translateX(0) rotate(0deg) scale(1);
        filter: brightness(1);
    }
    25% { 
        transform: translateY(-50px) translateX(20px) rotate(90deg) scale(1.2);
        filter: brightness(1.5);
    }
    50% { 
        transform: translateY(25px) translateX(-30px) rotate(180deg) scale(0.9);
        filter: brightness(1);
    }
    75% { 
        transform: translateY(-25px) translateX(-20px) rotate(270deg) scale(1.1);
        filter: brightness(1.3);
    }
}

@keyframes diamondPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 20px rgba(0, 198, 255, 0.5);
    }
    50% { 
        transform: scale(1.15);
        box-shadow: 0 0 40px rgba(0, 198, 255, 0.9),
                    0 0 60px rgba(157, 78, 221, 0.6),
                    0 0 80px rgba(255, 193, 7, 0.3);
    }
}

@keyframes shineEffect {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes bounceDiamond {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    30% { transform: translateY(-15px) rotate(5deg); }
    70% { transform: translateY(-8px) rotate(-3deg); }
}

@keyframes spinDiamond {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes rainbowBorder {
    0%, 100% { border-color: var(--diamond-blue); }
    25% { border-color: var(--diamond-purple); }
    50% { border-color: var(--diamond-emerald); }
    75% { border-color: var(--diamond-pink); }
}

@keyframes textShimmer {
    0% { background-position: -100% center; }
    100% { background-position: 200% center; }
}

/* کانتینر اصلی با افکت الماس */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 50px 30px;
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1),
                inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    margin-top: 40px;
    margin-bottom: 40px;
}

.container::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    bottom: 10px;
    left: 10px;
    border: 2px dashed rgba(0, 198, 255, 0.2);
    border-radius: 25px;
    pointer-events: none;
}

/* عنوان اصلی با الماس‌های درخشان */
h1 {
    text-align: center;
    margin-bottom: 70px;
    font-size: 3rem;
    font-weight: 800;
    position: relative;
    padding: 25px 0;
}

h1::before {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    transform: translateX(50%);
    width: 200px;
    height: 6px;
    background: var(--diamond-gradient);
    border-radius: 3px;
    animation: rainbowBorder 4s linear infinite;
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 150px;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--diamond-blue), 
        var(--diamond-emerald), 
        var(--diamond-blue), 
        transparent);
    border-radius: 3px;
}

h1 span {
    background: linear-gradient(90deg, 
        var(--diamond-blue) 0%, 
        var(--diamond-purple) 25%, 
        var(--diamond-pink) 50%, 
        var(--diamond-emerald) 75%, 
        var(--diamond-blue) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: block;
    font-size: 3.2rem;
    margin-top: 15px;
    animation: textShimmer 3s linear infinite,
               bounceDiamond 6s ease-in-out infinite;
    text-shadow: 0 5px 15px rgba(0, 198, 255, 0.3);
}

/* آیکون الماس اصلی */
.gem-icon {
    width: 180px;
    height: 180px;
    margin: 0 auto 60px;
    background: var(--diamond-gradient);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    position: relative;
    box-shadow: var(--shadow-diamond),
                inset 0 0 50px rgba(255, 255, 255, 0.5);
    animation: diamondPulse 3s ease-in-out infinite,
               spinDiamond 20s linear infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
}

.gem-icon:hover {
    transform: scale(1.1) rotate(10deg);
    animation-play-state: paused;
}

.gem-icon::before {
    content: '';
    position: absolute;
    width: 80%;
    height: 80%;
    background: rgba(255, 255, 255, 0.9);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    filter: blur(15px);
    opacity: 0.5;
}

.gem-icon img {
    width: 60%;
    height: auto;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

/* فرم‌های الماس‌گونه */
form {
    background: var(--card-bg);
    border-radius: 25px;
    padding: 50px 40px;
    margin-bottom: 60px;
    box-shadow: var(--shadow-diamond);
    border: var(--border-diamond);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

form::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(0, 198, 255, 0.1) 50%, 
        transparent 70%);
    animation: shineEffect 4s linear infinite;
}

form:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-glow),
                0 30px 80px rgba(0, 198, 255, 0.4);
    border-color: var(--diamond-pink);
}

label {
    display: block;
    margin-top: 20px;
    font-size: 1.3rem;
    color: var(--text-primary);
    font-weight: 700;
    position: relative;
    padding-right: 40px;
}

label::before {
    content: '💎';
    position: absolute;
    right: 0;
    font-size: 1.5rem;
    animation: bounceDiamond 2s ease-in-out infinite;
}

/* فیلدهای ورودی با افکت الماس */
.input-group {
    position: relative;
    margin-bottom: 35px;
}

.input-group::after {
    content: '✨';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    opacity: 0.5;
}

input[type="text"],
input[type="password"],
input[type="file"] {
    width: 100%;
    padding: 20px 50px 20px 20px;
    border-radius: 20px;
    border: 3px solid var(--diamond-silver);
    background-color: white;
    color: var(--text-primary);
    font-size: 1.2rem;
    transition: all 0.4s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    background: linear-gradient(135deg, white 0%, #F8FAFF 100%);
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--diamond-blue);
    box-shadow: 0 0 0 5px rgba(0, 198, 255, 0.2),
                0 15px 40px rgba(0, 198, 255, 0.3);
    transform: translateY(-5px);
    background: linear-gradient(135deg, white 0%, #E8F4FF 100%);
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

/* دکمه‌های درخشان الماسی */
button {
    display: block;
    width: 100%;
    padding: 25px;
    background: var(--diamond-gradient);
    background-size: 200% auto;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 1.4rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    margin-top: 25px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 15px 35px rgba(0, 198, 255, 0.4);
    letter-spacing: 1px;
    text-transform: uppercase;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    transition: left 0.7s ease;
    z-index: -1;
}

button:hover {
    animation: diamondPulse 1.5s ease-in-out infinite,
               bounceDiamond 0.6s ease;
    transform: translateY(-8px);
    box-shadow: 0 25px 60px rgba(0, 198, 255, 0.6);
    background-position: right center;
    letter-spacing: 2px;
}

button:hover::before {
    left: 100%;
}

button::after {
    content: '🚀';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
}

/* بخش نتایج الماسی */
.result {
    min-height: 150px;
    background: linear-gradient(145deg, white 0%, #F5F7FF 100%);
    border-radius: 25px;
    padding: 40px;
    margin-top: 40px;
    box-shadow: var(--shadow-diamond);
    border: 3px solid transparent;
    background-clip: padding-box;
    position: relative;
    transition: all 0.5s ease;
    animation: rainbowBorder 6s linear infinite;
}

.result::before {
    content: '';
    position: absolute;
    top: -3px;
    right: -3px;
    bottom: -3px;
    left: -3px;
    background: var(--diamond-gradient);
    border-radius: 28px;
    z-index: -1;
    opacity: 0.3;
    filter: blur(5px);
}

.result:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

/* حالت‌های مختلف نتیجه با الماس‌های متفاوت */
.not-found {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(255, 240, 245, 0.95) 100%);
    color: var(--error-glow);
    border: 3px solid rgba(255, 45, 117, 0.4);
    animation: diamondPulse 2s ease-in-out infinite;
    font-weight: 600;
    position: relative;
    /* overflow: hidden; */
}

.not-found::before {
    content: '💔';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-40%);
    font-size: 3.5rem;
    opacity: 0.2;
}

.found {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(240, 255, 250, 0.98) 100%);
    border: 3px solid rgba(0, 217, 156, 0.4);
    position: relative;
}

.found::before {
    content: '🏆';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    opacity: 0.2;
}

/* جدول نتایج با استایل الماس */
.found table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 15px;
    margin-top: 25px;
}

.found tr {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 198, 255, 0.15);
    transition: all 0.4s ease;
    position: relative;
}

.found tr:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 198, 255, 0.3);
    z-index: 2;
}

.found tr::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background: var(--diamond-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.found tr:hover::before {
    opacity: 1;
}

.found td {
    padding: 20px;
    text-align: right;
    position: relative;
}

.found td:first-child {
    color: var(--diamond-blue);
    font-weight: 700;
    width: 35%;
    border-left: 4px solid var(--diamond-blue);
    font-size: 1.2rem;
    padding-right: 25px;
}

.found td:first-child::before {
    content: '💠';
    position: absolute;
    right: 5px;
    opacity: 0.5;
}

.found td:last-child {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

/* دسته‌بندی‌های مختلف ستون‌ها بر اساس موضوع */
.found td[data-category="art"]:first-child {
    color: var(--diamond-pink);
    border-left-color: var(--diamond-pink);
}

.found td[data-category="science"]:first-child {
    color: var(--diamond-emerald);
    border-left-color: var(--diamond-emerald);
}

.found td[data-category="cultural"]:first-child {
    color: var(--diamond-purple);
    border-left-color: var(--diamond-purple);
}

/* هشدارهای الماسی */
.alert {
    padding: 30px;
    border-radius: 25px;
    margin-bottom: 35px;
    font-size: 1.3rem;
    border: 3px solid;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    animation: bounceDiamond 3s ease-in-out infinite;
}

.alert::before {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    opacity: 0.3;
}

.alert.error {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(255, 240, 245, 0.95) 100%);
    border-color: var(--error-glow);
    color: var(--error-glow);
    box-shadow: 0 10px 30px rgba(255, 45, 117, 0.2);
}

.alert.error::before {
    content: '⚠️';
}

.alert.success {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(240, 255, 250, 0.95) 100%);
    border-color: var(--success-glow);
    color: var(--success-glow);
    box-shadow: 0 10px 30px rgba(0, 217, 156, 0.2);
}

.alert.success::before {
    content: '✅';
}

/* بخش آمار با الماس‌های آماری */
.stats-container {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFF 100%);
    border-radius: 25px;
    padding: 35px;
    margin-top: 40px;
    border: 3px solid rgba(255, 193, 7, 0.4);
    box-shadow: 0 15px 40px rgba(255, 193, 7, 0.15);
    position: relative;
    overflow: hidden;
}

.stats-container::before {
    content: '📊';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2.5rem;
    opacity: 0.2;
}

.stats-container p {
    color: var(--diamond-gold);
    font-size: 1.4rem;
    margin-bottom: 30px;
    font-weight: 700;
    text-align: center;
    position: relative;
}

.stats-container p::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 50%;
    transform: translateX(50%);
    width: 100px;
    height: 3px;
    background: var(--diamond-gradient);
    border-radius: 3px;
}

.stats-container ul {
    list-style-type: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
}

.stats-container li {
    padding: 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.stats-container li::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background: var(--diamond-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stats-container li:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 198, 255, 0.2);
}

.stats-container li:hover::before {
    opacity: 1;
}

.stats-container li strong {
    color: var(--diamond-purple);
    font-size: 1.2rem;
    font-weight: 700;
}

/* لینک‌های درخشان */
a {
    color: var(--diamond-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
    transition: all 0.4s ease;
    position: relative;
    padding: 10px 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

a::before {
    content: '➤';
    transition: transform 0.3s ease;
}

a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 3px;
    background: var(--diamond-gradient);
    transition: width 0.4s ease;
    border-radius: 3px;
}

a:hover {
    color: var(--diamond-pink);
    transform: translateX(-10px);
}

a:hover::before {
    transform: translateX(5px);
}

a:hover::after {
    width: 100%;
}

hr {
    border: none;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--diamond-blue), 
        var(--diamond-emerald), 
        var(--diamond-pink), 
        transparent);
    margin: 60px 0;
    border-radius: 3px;
    position: relative;
}

hr::after {
    content: '💎';
    position: absolute;
    top: 50%;
    right: 50%;
    transform: translate(50%, -50%);
    background: white;
    padding: 0 20px;
    font-size: 1.5rem;
}

/* صفحه مدیریت ویژه */
.admin-section {
    position: relative;
}

.admin-section::before {
    content: '👨‍🎓';
    position: absolute;
    top: -35px;
    right: 50%;
    transform: translateX(50%);
    font-size: 3rem;
    filter: drop-shadow(0 5px 15px rgba(0, 198, 255, 0.5));
    animation: bounceDiamond 2s ease-in-out infinite,
               spinDiamond 10s linear infinite;
    background: white;
    border-radius: 50%;
    padding: 10px;
    z-index: 2;
}

/* نشان‌های افتخار */
.badge {
    display: inline-block;
    padding: 8px 20px;
    margin: 5px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.badge-science {
    background: var(--science-gradient);
    color: white;
    box-shadow: 0 5px 15px rgba(0, 198, 255, 0.3);
}

.badge-art {
    background: var(--art-gradient);
    color: white;
    box-shadow: 0 5px 15px rgba(255, 45, 117, 0.3);
}

.badge-culture {
    background: var(--diamond-gradient);
    color: white;
    box-shadow: 0 5px 15px rgba(157, 78, 221, 0.3);
}

/* responsive */
@media (max-width: 992px) {
    .container {
        padding: 40px 25px;
        margin-top: 30px;
        margin-bottom: 30px;
    }
    
    h1 {
        font-size: 2.5rem;
        margin-bottom: 50px;
    }
    
    h1 span {
        font-size: 2.7rem;
    }
    
    .gem-icon {
        width: 150px;
        height: 150px;
        margin-bottom: 50px;
    }
    
    form {
        padding: 40px 30px;
    }
    
    .stats-container ul {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h1 span {
        font-size: 2.2rem;
    }
    
    .container {
        padding: 30px 20px;
        border-radius: 25px;
    }
    
    .gem-icon {
        width: 130px;
        height: 130px;
        margin-bottom: 40px;
    }
    
    form {
        padding: 30px 25px;
        border-radius: 20px;
    }
    
    .found td {
        padding: 15px;
        font-size: 1rem;
    }
    
    button {
        padding: 20px;
        font-size: 1.2rem;
    }
    
    .stats-container ul {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    h1 span {
        font-size: 2rem;
    }
    
    .gem-icon {
        width: 110px;
        height: 110px;
    }
    
    form {
        padding: 25px 20px;
    }
    
    button {
        padding: 18px;
        font-size: 1.1rem;
    }
    
    .result {
        padding: 25px 20px;
    }
    
    .alert {
        padding: 20px;
        font-size: 1.1rem;
    }
}

hr {
    overflow: visible;
}