/* Reset and Base Styles (Minimal, only for calculator) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    line-height: 1.6;
    color: #333;
    background-color: #f5f6f5;
}

/* Calculator-Specific Styles */
.calculator-container {
    max-width: 800px;
    margin: 1rem; /* Reduced for mobile */
    padding: 1.5rem; /* Slightly smaller padding */
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.calculator-container h2 {
    color: #d81c38;
    font-size: 1.5rem; /* Smaller for mobile */
    margin-bottom: 1rem;
    text-align: center;
}

.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 700;
    font-size: 0.9rem; /* Adjusted for mobile */
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 0.6rem; /* Slightly smaller padding */
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.9rem; /* Smaller text */
    color: #333;
}

.input-group select {
    background: white;
    cursor: pointer;
}

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

.calculate-btn {
    background: #f58220;
    color: white;
    padding: 0.6rem 1rem; /* Adjusted padding */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem; /* Smaller font */
    width: 100%;
    transition: background 0.3s;
}

.calculate-btn:hover {
    background: #d81c38;
}

.progress-container {
    width: 100%;
    height: 8px; /* Slightly thinner for mobile */
    background: #ddd;
    border-radius: 5px;
    margin-top: 1rem;
    display: none;
}

.progress-bar {
    width: 0;
    height: 100%;
    background: #f58220;
    border-radius: 5px;
    transition: width 15s linear;
}

.result {
    margin-top: 1rem;
    padding: 0.8rem; /* Reduced padding */
    background: #f5f6f5;
    border-radius: 5px;
    text-align: center;
    display: none;
}

.result.show {
    display: block;
}

.result h3 {
    color: #d81c38;
    margin-bottom: 0.5rem;
    font-size: 1.2rem; /* Smaller for mobile */
}

.result p {
    font-size: 0.9rem; /* Smaller text */
}

/* Confetti Animation */
.confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    display: none;
}

.confetti.active {
    display: block;
}

.confetti-piece {
    position: absolute;
    width: 8px; /* Smaller for mobile */
    height: 8px;
    animation: confetti 2s linear infinite;
}

@keyframes confetti {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Mobile-First Media Queries */

/* Mobile (up to 767px) */
@media (max-width: 767px) {
    .calculator-container {
        margin: 2.5rem;
        padding: 1rem;
        max-width: 350px;
    }

    .calculator-container h2 {
        font-size: 1.3rem;
    }

    .input-group label {
        font-size: 0.85rem;
    }

    .input-group input,
    .input-group select {
        padding: 0.5rem;
        font-size: 0.85rem;
    }

    .calculate-btn {
        padding: 0.5rem;
        font-size: 0.85rem;
    }

    .progress-container {
        height: 6px;
    }

    .result h3 {
        font-size: 1rem;
    }

    .result p {
        font-size: 0.85rem;
    }

    .confetti-piece {
        width: 6px;
        height: 6px;
    }
}

/* Tablet (768px to 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .calculator-container {
        max-width: 600px;
        margin: 1.5rem auto;
        padding: 1.5rem;
    }

    .calculator-container h2 {
        font-size: 1.6rem;
    }

    .input-group label {
        font-size: 0.95rem;
    }

    .input-group input,
    .input-group select {
        padding: 0.65rem;
        font-size: 0.95rem;
    }

    .calculate-btn {
        padding: 0.65rem 1rem;
        font-size: 0.95rem;
    }

    .result h3 {
        font-size: 1.3rem;
    }

    .result p {
        font-size: 0.95rem;
    }
}

/* Desktop (1024px and above) */
@media (min-width: 1024px) {
    .calculator-container {
        max-width: 800px;
        margin: 2rem auto;
        padding: 2rem;
    }

    .calculator-container h2 {
        font-size: 1.8rem;
    }

    .input-group label {
        font-size: 1rem;
    }

    .input-group input,
    .input-group select {
        padding: 0.75rem;
        font-size: 1rem;
    }

    .calculate-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .progress-container {
        height: 10px;
    }

    .result h3 {
        font-size: 1.4rem;
    }

    .result p {
        font-size: 1rem;
    }

    .confetti-piece {
        width: 10px;
        height: 10px;
    }
}

/* Media Query for max-width: 600px */
@media (max-width: 600px) {
    /* Calculator Container */
    .calculator-container {
        margin: 1rem;
        padding: 1rem;
        width: 90vw;
    }

    .calculator-container h2 {
        font-size: 1.3rem; /* Smaller heading for mobile */
    }

    /* Input Group */
    .input-group {
        margin-bottom: 0.75rem;
    }

    .input-group label {
        font-size: 0.85rem; /* Smaller label text */
    }

    .input-group input,
    .input-group select {
        padding: 0.5rem; /* Smaller padding */
        font-size: 0.85rem; /* Smaller input text */
    }

    /* Calculate Button */
    .calculate-btn {
        padding: 0.5rem; /* Smaller padding */
        font-size: 0.85rem; /* Smaller button text */
    }

    /* Progress Bar */
    .progress-container {
        height: 6px; /* Thinner progress bar */
    }

    /* Result Section */
    .result {
        margin-top: 0.75rem;
        padding: 0.75rem; /* Smaller padding */
    }

    .result h3 {
        font-size: 1.1rem; /* Smaller heading */
    }

    .result p {
        font-size: 0.85rem; /* Smaller text */
    }

    /* Confetti Animation */
    .confetti-piece {
        width: 6px; /* Smaller confetti pieces */
        height: 6px;
    }
}

/* Introducton */

/* IELTS Reading Score Calculator Section */
.reading-calculator {
    background: #ffffff;
    padding: 2rem 1rem;
}

.reading-calculator-container {
    max-width: 1200px;
    margin: 0 auto;
}

.reading-calculator h1 {
    font-size: 2rem;
    color: #d81c38;
    margin-bottom: 1rem;
    font-weight: 700;
    text-align: center;
}

.reading-calculator p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.reading-calculator .disclaimer {
    font-size: 0.95rem;
    color: #333;
    background: #f5f6f5;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 2rem;
}

.reading-why, .reading-how-to-use, .reading-features, .reading-sample, .reading-trends, .reading-tips, .reading-cta {
    margin-bottom: 2rem;
}

.reading-calculator h2 {
    font-size: 1.6rem;
    color: #d81c38;
    margin-bottom: 1rem;
    text-align: center;
}

.features-list, .steps-list, .feedback-list {
    list-style: none;
    padding-left: 0;
}

.features-list li, .steps-list li, .feedback-list li {
    font-size: 1rem;
    color: #333;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.features-list li:before, .feedback-list li:before {
    content: '\f058'; /* FontAwesome check-circle */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #f58220;
    position: absolute;
    left: 0;
    top: 2px;
}

.steps-list li:before {
    content: counter(step) '.'; /* Numbered list */
    counter-increment: step;
    color: #f58220;
    position: absolute;
    left: 0;
    font-weight: 700;
}

.steps-list {
    counter-reset: step;
}

.reading-sample .feedback-list {
    background: #f5f6f5;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
}

.reading-cta {
    text-align: center;
}

.reading-cta p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.reading-cta .cta-btn {
    background: #f58220;
    color: white;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Responsive Adjustments */
@media (min-width: 768px) {
    .reading-calculator h1 {
        font-size: 2.5rem;
    }

    .reading-calculator h2 {
        font-size: 1.8rem;
    }

    .features-list, .feedback-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .steps-list {
        max-width: 600px;
        margin: 0 auto;
    }

    .reading-cta .cta-btn {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
}

@media (min-width: 1024px) {
    .reading-calculator {
        padding: 3rem 1rem;
    }

    .reading-calculator h1 {
        font-size: 3rem;
    }
}