:root {
    --bg-color: #fdfdfd;
    --primary-color: #B5EAD7;
    /* Mint */
    --primary-dark: #95DAB6;
    --secondary-color: #C7CEEA;
    /* Periwinkle */
    --accent-pink: #FFB7B2;
    /* Pastel Pink */
    --text-color: #555;
    --card-bg: #ffffff;
    --success: #E2F0CB;
    --danger: #FFDAC1;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

header {
    margin-top: 20px;
    text-align: center;
    margin-bottom: 30px;
}

main {
    width: 90%;
    max-width: 600px;
    text-align: center;
}

/* الأزرار */
.btn {
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin: 10px;
    color: #444;
    box-shadow: var(--shadow);
}

.btn:hover {
    transform: translateY(-3px);
}

.btn:active {
    transform: translateY(1px);
}

.primary {
    background-color: var(--primary-color);
}

.primary:hover {
    background-color: var(--primary-dark);
}

.secondary {
    background-color: var(--secondary-color);
}

.danger {
    background-color: var(--danger);
}

.success {
    background-color: var(--success);
}

.text-btn {
    background: none;
    box-shadow: none;
    color: #888;
}

/* تنسيق زر التثبيت الجديد */
.install-btn {
    background-color: #fff;
    border: 2px solid var(--primary-color);
    color: var(--primary-dark);
    font-size: 0.9rem;
    margin-top: 15px;
    display: inline-block;
}

.install-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

/* تأثير النبض للزر الرئيسي */
.pulse {
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% {
        box-shadow: 0 0 0 0 rgba(181, 234, 215, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(181, 234, 215, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(181, 234, 215, 0);
    }
}

/* Dashboard Stats */
.stats-container {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
}

.stat-box {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    width: 45%;
}

.stat-box span {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-pink);
}

/* Forms */
textarea {
    width: 100%;
    height: 100px;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-family: inherit;
    margin-bottom: 15px;
    resize: none;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Card 3D Flip Effect */
.scene {
    width: 100%;
    height: 300px;
    perspective: 1000px;
    margin-bottom: 20px;
}

.card {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    cursor: pointer;
}

.card.is-flipped {
    transform: rotateY(180deg);
}

/* تأثير الاهتزاز عند الخطأ */
.card.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0% {
        transform: rotateY(180deg) translateX(0);
    }

    25% {
        transform: rotateY(180deg) translateX(-10px);
    }

    50% {
        transform: rotateY(180deg) translateX(10px);
    }

    75% {
        transform: rotateY(180deg) translateX(-10px);
    }

    100% {
        transform: rotateY(180deg) translateX(0);
    }
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    box-shadow: var(--shadow);
    background: white;
    padding: 20px;
    font-size: 1.2rem;
}

.card-front {
    border-bottom: 5px solid var(--primary-color);
}

.card-back {
    transform: rotateY(180deg);
    background-color: #fffbfb;
    border-bottom: 5px solid var(--accent-pink);
}

/* Helpers */
.hidden {
    display: none !important;
}

.hint {
    font-size: 0.8rem;
    color: #999;
    margin-top: 10px;
}

.celebration {
    font-size: 4rem;
    margin-bottom: 10px;
    animation: spin 1s ease-in-out;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* Progress */
.progress-bar {
    height: 8px;
    background: #eee;
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
}

#session-progress {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s;
}