@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700&display=swap');

:root {
    --pink: #ff6b9d;
    --pink-light: #ffb6c1;
    --pink-dark: #e91e63;
    --gold: #ffd700;
    --gold-light: #ffeaa7;
    --purple: #c084fc;
    --white: #fff;
    --shadow: 0 10px 40px rgba(255, 105, 180, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    direction: rtl;
    min-height: 100vh;
    overflow-x: hidden;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 30%, #fbc2eb 60%, #a18cd1 100%);
    background-size: 400% 400%;
    animation: gradientShift 12s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Confetti / particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    font-size: 20px;
    opacity: 0.7;
    animation: float 8s linear infinite;
}

@keyframes float {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.8; }
    100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}

.container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 480px;
}

.card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    border-radius: 28px;
    padding: 36px 28px;
    box-shadow: var(--shadow), 0 0 0 3px rgba(255, 215, 0, 0.25);
    text-align: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.08) 0%, transparent 60%);
    animation: shine 6s linear infinite;
}

@keyframes shine {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.stage {
    display: none;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stage.active {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.emojis {
    font-size: 2.8rem;
    margin-bottom: 18px;
    letter-spacing: 8px;
    animation: bounce 2s ease infinite;
    line-height: 1.4;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.text-content {
    font-size: 1.25rem;
    line-height: 1.9;
    color: #4a2c4a;
    margin-bottom: 24px;
    white-space: pre-line;
    font-weight: 500;
}

.media-wrapper {
    margin: 20px 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    max-height: 320px;
}

.media-wrapper img,
.media-wrapper video {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    display: block;
    border-radius: 18px;
}

.media-wrapper audio {
    width: 100%;
    margin-top: 10px;
}

.btn {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b9d, #c084fc, #ffd700);
    background-size: 200% 200%;
    color: white;
    border: none;
    padding: 16px 42px;
    font-size: 1.15rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.45);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: gradientBtn 4s ease infinite;
}

@keyframes gradientBtn {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 30px rgba(255, 107, 157, 0.6);
}

.btn:active {
    transform: translateY(0) scale(0.98);
}

.btn.final {
    background: linear-gradient(135deg, #ffd700, #ff6b9d);
}

/* Progress dots */
.progress {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 107, 157, 0.3);
    transition: all 0.3s ease;
}

.dot.active {
    background: linear-gradient(135deg, #ff6b9d, #ffd700);
    transform: scale(1.3);
    box-shadow: 0 0 12px rgba(255, 107, 157, 0.7);
}

/* Final celebration */
.celebration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

/* Admin styles */
.admin-body {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    min-height: 100vh;
    padding: 30px 15px;
    direction: rtl;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}

.admin-container {
    max-width: 900px;
    margin: 0 auto;
}

.admin-card {
    background: rgba(255,255,255,0.97);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.admin-title {
    color: #e91e63;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #444;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #f0c0d0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    transition: border 0.3s;
    direction: rtl;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #ff6b9d;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.btn-admin {
    background: linear-gradient(135deg, #ff6b9d, #c084fc);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-admin:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255,107,157,0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ff4757, #ff6b81);
}

.btn-success {
    background: linear-gradient(135deg, #2ed573, #7bed9f);
}

.stage-item {
    background: #fff5f8;
    border: 2px dashed #ffb6c1;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
}

.stage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.stage-number {
    background: linear-gradient(135deg, #ff6b9d, #ffd700);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.login-box {
    max-width: 400px;
    margin: 80px auto;
}

.alert {
    padding: 12px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
}

.media-preview {
    max-width: 200px;
    max-height: 150px;
    border-radius: 10px;
    margin-top: 10px;
}

.flex-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.flex-row > * {
    flex: 1;
    min-width: 140px;
}

@media (max-width: 500px) {
    .card {
        padding: 28px 20px;
    }
    .text-content {
        font-size: 1.1rem;
    }
    .emojis {
        font-size: 2.2rem;
    }
}
