:root {
    --bg-color: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --primary: #00B945; /* green */
    --secondary: #FFDF00; /* yellow */
    --secondary-hover: #f0d000;
    --success: #00B945;
    --error: #ef4444;
    --card-bg: #ffffff;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    padding: 2rem 1rem;
    position: relative;
}

/* Background animated floating elements */
.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    filter: blur(60px);
    opacity: 0.15;
    border-radius: 50%;
    animation: float 20s infinite ease-in-out alternate;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: var(--primary);
    animation-delay: 0s;
}

.shape-2 {
    bottom: -10%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: var(--secondary);
    animation-delay: -5s;
}

.shape-3 {
    top: 40%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: var(--primary);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    100% { transform: translate(60px, 60px) scale(1.1) rotate(20deg); }
}

.container {
    width: 100%;
    max-width: 1100px;
    text-align: center;
}

.header {
    margin-bottom: 4rem;
    animation: fadeInDown 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--primary);
    letter-spacing: -1px;
}

.header p {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.card-container {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.action-card {
    background: var(--card-bg);
    border: 1px solid #f3f4f6;
    border-radius: 24px;
    padding: 3rem 2rem 2rem 2rem;
    width: 100%;
    max-width: 340px;
    transition: all 0.3s ease;
    text-align: center;
    color: var(--text-main);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.action-card:nth-child(1) { animation-delay: 0.1s; }
.action-card:nth-child(2) { animation-delay: 0.3s; }
.action-card:nth-child(3) { animation-delay: 0.5s; }

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.action-card:hover::before {
    opacity: 1;
}

.action-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.08);
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.action-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.action-card h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.action-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 2.5rem;
    flex-grow: 1;
}

.start-btn {
    width: 100%;
    padding: 1rem;
    background-color: var(--secondary);
    color: #000000;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(255, 223, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.start-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(45deg);
    transition: all 0.3s ease;
    opacity: 0;
}

.start-btn:hover::after {
    left: 100%;
    opacity: 1;
}

.start-btn:hover {
    background-color: var(--secondary-hover);
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(255, 223, 0, 0.5);
}

.start-btn:active {
    transform: scale(0.95);
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s linear 0s;
}

.modal-content {
    background: var(--bg-color);
    border-radius: 24px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95) translateY(10px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
    will-change: transform, opacity;
    backface-visibility: hidden;
    overflow: hidden;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.close-btn:hover {
    color: var(--text-main);
}

.explanation-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    transition: opacity 0.2s ease;
    opacity: 1;
}

.explanation-content {
    padding: 1.5rem;
    overflow-y: auto;
    color: var(--text-main);
    text-align: left;
    flex-grow: 1;
}

.exp-block {
    margin-bottom: 1.5rem;
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 16px;
    border-left: 4px solid var(--primary);
}

.exp-block h4 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.exp-block p {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.exp-example {
    background: rgba(255, 223, 0, 0.15);
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #000;
}

.explanation-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #f3f4f6;
    text-align: center;
    background: #ffffff;
}

.start-practice-btn {
    width: 100%;
    font-size: 1.2rem;
    padding: 1.2rem;
    background-color: var(--primary);
}
.start-practice-btn:hover {
    background-color: #00a03c;
    box-shadow: 0 4px 10px rgba(0, 185, 69, 0.2);
}

.quiz-view {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    transition: opacity 0.2s ease;
    opacity: 1;
}

.view-fade-out {
    opacity: 0 !important;
}

.quiz-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex-grow: 1;
}

.question-container {
    margin-bottom: 2rem;
}

.q-number {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

#question-text {
    font-size: 1.3rem;
    line-height: 1.5;
    font-weight: 600;
    color: var(--text-main);
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-btn {
    background: #ffffff;
    border: 2px solid #f3f4f6;
    border-radius: 16px;
    padding: 1rem 1.5rem;
    text-align: left;
    color: var(--text-main);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.option-btn:hover {
    background: #f9fafb;
    border-color: var(--secondary);
    transform: translateX(5px);
}

.option-prefix {
    font-weight: 700;
    color: var(--primary);
    margin-right: 1rem;
    width: 24px;
}

.option-btn.correct {
    background: rgba(0, 185, 69, 0.1);
    border-color: var(--success);
}

.option-btn.wrong {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
}

.option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.feedback-container {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    animation: fadeIn 0.3s ease;
}

.feedback-container.success {
    background: rgba(0, 185, 69, 0.1);
    border: 2px solid rgba(0, 185, 69, 0.2);
    color: var(--success);
}

.feedback-container.error {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.feedback-icon {
    font-size: 1.5rem;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: #ffffff;
}

button {
    font-family: inherit;
    outline: none;
}

.btn-primary, .btn-secondary {
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: #00a03c;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 185, 69, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.difficulty-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    background: #f3f4f6;
    color: var(--text-muted);
}

.difficulty-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.difficulty-easy .difficulty-dot { background-color: var(--success); }
.difficulty-medium .difficulty-dot { background-color: var(--secondary); }
.difficulty-hard .difficulty-dot { background-color: var(--error); }

/* Call to Action Section */
.cta-section {
    margin-top: 5rem;
    background: var(--card-bg);
    border-radius: 24px;
    padding: 3rem 2rem;
    border: 1px solid #f3f4f6;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    text-align: center;
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.7s;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.cta-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: var(--text-main);
}

.cta-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto 2.5rem auto;
}

.coupon-code {
    background: rgba(0, 185, 69, 0.1);
    color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-weight: 700;
    font-family: monospace;
    font-size: 1.1rem;
}

.cta-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--primary);
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.15rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 185, 69, 0.3);
}

.cta-btn:hover {
    background-color: #00a03c;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 185, 69, 0.4);
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2.2rem;
    }
    .action-card {
        padding: 2.5rem 1.5rem 1.5rem 1.5rem;
    }
    .modal-content {
        width: 95%;
    }
    .card-container {
        gap: 1.5rem;
    }
}
