/* Asosiy sozlamalar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Fredoka', sans-serif; /* Yumaloq va quvnoq shrift */
}

body {
    background: linear-gradient(135deg, #FF69B4, #FFB6C1, #87CEEB, #98FB98, #FFD700, #FFA500);
    background-size: 400% 400%;
    animation: rainbowBg 10s ease infinite;
    padding-bottom: 50px;
    position: relative;
    overflow-x: hidden;
}

@keyframes rainbowBg {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 100% 0%; }
    75% { background-position: 0% 0%; }
    100% { background-position: 0% 50%; }
}

/* Header qismi */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: linear-gradient(45deg, #FF1493, #FF69B4, #FFB6C1, #87CEEB, #00CED1, #00FF00, #FFD700);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    box-shadow: 0 8px 30px rgba(255, 20, 147, 0.6), 0 0 30px rgba(0, 206, 209, 0.4);
    border-radius: 0 0 35px 35px;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo h1 {
    color: #FFFFFF;
    font-size: 1.8rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3), 0 0 10px rgba(255, 255, 0, 0.5);
    animation: bounce 1.5s ease-in-out infinite alternate;
    letter-spacing: 1px;
}

@keyframes bounce {
    0% { transform: translateY(0px) scale(1); }
    100% { transform: translateY(-8px) scale(1.05); }
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(45deg, #FFD700, #FF69B4, #00CED1, #00FF00);
    padding: 8px 15px;
    border-radius: 50px;
    border: 4px solid #FFFFFF;
    box-shadow: 0 6px 20px rgba(255, 105, 180, 0.5), 0 0 20px rgba(0, 206, 209, 0.4);
    animation: profileGlow 2.5s ease-in-out infinite alternate;
}

@keyframes profileGlow {
    0% { box-shadow: 0 6px 20px rgba(255, 105, 180, 0.5), 0 0 20px rgba(0, 206, 209, 0.4); }
    100% { box-shadow: 0 8px 25px rgba(255, 215, 0, 0.6), 0 0 30px rgba(0, 255, 0, 0.4); }
}

.user-info {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.user-name {
    font-weight: 600;
    color: #FFFFFF;
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.user-level {
    font-size: 0.8rem;
    color: #FFFFFF;
    opacity: 0.9;
}

.avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
}

/* Asosiy konteyner */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.intro-text {
    text-align: center;
    margin-bottom: 30px;
    color: #FF1493;
    text-shadow: 2px 2px 4px rgba(255, 20, 147, 0.3);
    animation: bounce 3s ease-in-out infinite alternate;
}

.intro-text h2 {
    background: linear-gradient(45deg, #FF1493, #FF69B4, #00CED1, #00FF00, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textRainbow 4s ease-in-out infinite;
    font-size: 2rem;
    font-weight: 700;
}

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

/* Grid sistemasi */
.letters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 25px;
}

/* Karta dizayni */
.card {
    background: linear-gradient(135deg, #FFB6C1, #87CEEB);
    border-radius: 30px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 4px solid transparent;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 0 #FF69B4, 0 10px 35px rgba(255, 20, 147, 0.4);
}

/* Karta ichidagi elementlar */
.letter-main {
    font-size: 3.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, #FF1493, #FF69B4, #00CED1, #00FF00, #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    animation: letterGlow 2s ease-in-out infinite alternate;
}

@keyframes letterGlow {
    0% { transform: scale(1) rotate(-2deg); }
    100% { transform: scale(1.1) rotate(2deg); }
}

.letter-sub {
    font-size: 1.5rem;
    color: #FF1493;
    text-shadow: 1px 1px 2px rgba(255, 20, 147, 0.3);
    font-weight: 600;
}

.card-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-top: 10px;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.2));
}

/* Karta holatlari (Status) */

/* Ochiq (Active/Completed) */
.card.unlocked {
    border: 4px solid;
    border-image: linear-gradient(45deg, #FFD700, #00CED1, #FF1493) 1;
    background: linear-gradient(135deg, #FFFFFF, #F8F9FA);
    animation: cardPulse 3s ease-in-out infinite;
}

@keyframes cardPulse {
    0%, 100% { transform: translateY(0px); box-shadow: 0 12px 0 #FF69B4, 0 10px 35px rgba(255, 20, 147, 0.4); }
    50% { transform: translateY(-5px); box-shadow: 0 15px 0 #00CED1, 0 18px 40px rgba(0, 206, 209, 0.5); }
}

.card.unlocked:hover {
    transform: translateY(-10px) rotate(5deg) scale(1.05);
    box-shadow: 0 18px 0 #FFD700, 0 25px 45px rgba(255, 215, 0, 0.6);
    background: linear-gradient(135deg, #FFF5F5, #F0F8FF);
}

/* Yopiq (Locked) */
.card.locked {
    background: linear-gradient(135deg, #E8E8E8, #D3D3D3);
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(50%);
    box-shadow: 0 6px 0 #B0B0B0;
}

.card.locked::after {
    content: '\f023'; /* Qulf belgisi FontAwesome */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    color: #8B8B8B;
    opacity: 0.8;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Modal oynasi */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 20, 147, 0.3);
    backdrop-filter: blur(12px);
}

.modal-content {
    background: linear-gradient(135deg, #FFB6C1, #87CEEB, #FFFFCC, #98FB98);
    margin: 10% auto;
    padding: 30px;
    border-radius: 35px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 45px rgba(255, 20, 147, 0.5), 0 0 30px rgba(0, 206, 209, 0.3);
    border: 6px solid;
    border-image: linear-gradient(45deg, #FF1493, #00CED1, #FFD700, #00FF00, #FF1493) 1;
    animation: modalBounce 0.5s ease-out;
}

@keyframes modalBounce {
    0% { transform: scale(0.3) rotate(-10deg); opacity: 0; }
    50% { transform: scale(1.1) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: #FF1493;
    transition: all 0.3s ease;
    animation: spinSlow 4s linear infinite;
}

.close-btn:hover {
    color: #00CED1;
    transform: rotate(180deg);
    animation: none;
}

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

.modal-image {
    width: 120px;
    margin: 20px 0;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.action-btn {
    background: linear-gradient(45deg, #FF1493, #00CED1, #FFD700);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 0 #FF69B4, 0 6px 20px rgba(255, 20, 147, 0.5);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.action-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 0 #00CED1, 0 10px 30px rgba(0, 206, 209, 0.6);
    background: linear-gradient(45deg, #00CED1, #FFD700, #FF1493);
}

.action-btn:active {
    transform: translateY(6px) scale(0.98);
    box-shadow: 0 2px 0 #FF69B4;
}

/* ========================================
   TOAST NOTIFICATION STYLES
   ======================================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    border-radius: 15px;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2), 0 0 20px rgba(255, 20, 147, 0.3);
    pointer-events: auto;
    animation: toastSlideIn 0.4s ease-out;
    max-width: 380px;
    min-width: 280px;
    border-left: 5px solid;
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: currentColor;
    animation: toastProgress 4s linear forwards;
    opacity: 0.3;
}

@keyframes toastSlideIn {
    0% { transform: translateX(120%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes toastSlideOut {
    0% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(120%); opacity: 0; }
}

@keyframes toastProgress {
    0% { width: 100%; }
    100% { width: 0%; }
}

.toast.hiding {
    animation: toastSlideOut 0.3s ease-in forwards;
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 0.9rem;
    opacity: 0.9;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    padding: 5px;
    flex-shrink: 0;
}

.toast-close:hover {
    opacity: 1;
}

/* Toast Types */
.toast.success {
    border-color: #4CAF50;
    color: #2E7D32;
}

.toast.success .toast-icon {
    color: #4CAF50;
}

.toast.error {
    border-color: #f44336;
    color: #c62828;
}

.toast.error .toast-icon {
    color: #f44336;
}

.toast.warning {
    border-color: #FF9800;
    color: #E65100;
}

.toast.warning .toast-icon {
    color: #FF9800;
}

.toast.info {
    border-color: #2196F3;
    color: #1565C0;
}

.toast.info .toast-icon {
    color: #2196F3;
}

/* Responsive */
@media (max-width: 480px) {
    .toast-container {
        left: 10px;
        right: 10px;
        top: 10px;
    }

    .toast {
        max-width: 100%;
        min-width: auto;
    }
}