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

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --past-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --perfect-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-bg: #1a1a2e;
    --card-bg: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #a8b2d1;
    --accent: #64ffda;
    --shadow: rgba(0, 0, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: var(--primary-gradient);
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: 0 20px 60px var(--shadow);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="none"/><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.05)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 30px); }
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.3rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    margin-bottom: 40px;
}

/* Timeline Graphic */
.timeline-graphic {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 0;
}

.timeline-line {
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%);
}

.timeline-marker {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
}

.timeline-marker.past {
    left: 15%;
}

.timeline-marker.perfect {
    right: 15%;
}

.timeline-marker span {
    display: block;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.marker-dot {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Tabs Navigation */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: var(--card-bg);
    padding: 10px;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow);
    flex-wrap: wrap;
}

.tab-btn {
    flex: 1;
    min-width: 120px;
    padding: 15px 25px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    background: var(--primary-gradient);
    color: var(--text-primary);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Content Sections */
.content {
    min-height: 500px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.tab-content.active {
    display: block;
}

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

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.tense-card {
    background: var(--card-bg);
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 10px 40px var(--shadow);
    transition: var(--transition);
    border-top: 4px solid transparent;
}

.tense-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px var(--shadow);
}

.past-card {
    border-top-color: #f5576c;
}

.past-card h2 {
    background: var(--past-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.perfect-card {
    border-top-color: #00f2fe;
}

.perfect-card h2 {
    background: var(--perfect-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tense-card h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.formula {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 25px;
    font-family: 'Courier New', monospace;
    text-align: center;
    font-weight: 600;
    border-left: 4px solid var(--accent);
}

.use-cases {
    margin-bottom: 25px;
}

.use-cases h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--accent);
}

.use-cases ul {
    list-style: none;
    padding-left: 0;
}

.use-cases li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
}

.use-cases li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.highlight {
    color: var(--accent);
    font-weight: 600;
}

.time-words {
    margin-bottom: 25px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.tag {
    background: rgba(100, 255, 218, 0.1);
    color: var(--accent);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(100, 255, 218, 0.3);
    transition: var(--transition);
}

.tag:hover {
    background: rgba(100, 255, 218, 0.2);
    transform: scale(1.05);
}

.example-box {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid var(--accent);
}

.example-sentence {
    font-size: 1.1rem;
    margin-top: 10px;
}

.verb {
    color: #ffd700;
    font-weight: 700;
}

.time {
    color: #ff6b6b;
    font-weight: 600;
}

/* Key Difference Section */
.key-difference {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px var(--shadow);
}

.key-difference h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.comparison-item {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    transition: var(--transition);
}

.comparison-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* Timeline View */
.scenario-selector {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 40px;
}

.scenario-btn {
    padding: 12px 30px;
    background: var(--card-bg);
    border: 2px solid rgba(100, 255, 218, 0.3);
    color: var(--text-primary);
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
}

.scenario-btn:hover {
    background: rgba(100, 255, 218, 0.1);
    border-color: var(--accent);
}

.scenario-btn.active {
    background: var(--accent);
    color: var(--dark-bg);
    border-color: var(--accent);
}

.timeline-display {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px var(--shadow);
}

.timeline-content h3 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.timeline-examples {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.timeline-example {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    transition: var(--transition);
}

.timeline-example:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(10px);
}

.timeline-badge {
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
}

.timeline-badge.past {
    background: var(--past-gradient);
}

.timeline-badge.perfect {
    background: var(--perfect-gradient);
}

.timeline-text {
    flex: 1;
    font-size: 1.1rem;
}

/* Examples Interactive */
.examples-container {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px var(--shadow);
}

.example-interactive {
    min-height: 300px;
}

.example-question {
    font-size: 1.3rem;
    margin-bottom: 30px;
    text-align: center;
    color: var(--accent);
    font-weight: 600;
}

.example-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.option-btn {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 15px;
    color: var(--text-primary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    transform: translateX(10px);
}

.option-btn.correct {
    background: rgba(76, 175, 80, 0.2);
    border-color: #4caf50;
}

.option-btn.incorrect {
    background: rgba(244, 67, 54, 0.2);
    border-color: #f44336;
}

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

.explanation {
    margin-top: 20px;
    padding: 20px;
    background: rgba(100, 255, 218, 0.1);
    border-left: 4px solid var(--accent);
    border-radius: 10px;
    animation: slideIn 0.5s ease-out;
}

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

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
}

.nav-btn {
    padding: 12px 30px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 25px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.nav-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.example-counter {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Quiz Section */
.quiz-container {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px var(--shadow);
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.score-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.question-container {
    margin-bottom: 30px;
}

.question-text {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.question-context {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-style: italic;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quiz-option {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 15px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 15px;
}

.quiz-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

.quiz-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.quiz-option.selected {
    border-color: var(--accent);
    background: rgba(100, 255, 218, 0.1);
}

.quiz-option.correct-answer {
    background: rgba(76, 175, 80, 0.2);
    border-color: #4caf50;
}

.quiz-option.wrong-answer {
    background: rgba(244, 67, 54, 0.2);
    border-color: #f44336;
}

.quiz-controls {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 15px 35px;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--text-primary);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 2px solid var(--accent);
}

.btn-secondary:hover {
    background: rgba(100, 255, 218, 0.2);
}

.quiz-feedback {
    margin-top: 25px;
    padding: 20px;
    border-radius: 15px;
    font-size: 1.1rem;
    animation: slideIn 0.5s ease-out;
}

.quiz-feedback.correct {
    background: rgba(76, 175, 80, 0.2);
    border-left: 4px solid #4caf50;
    color: #4caf50;
}

.quiz-feedback.incorrect {
    background: rgba(244, 67, 54, 0.2);
    border-left: 4px solid #f44336;
    color: #f44336;
}

.quiz-complete {
    text-align: center;
    padding: 40px;
}

.quiz-complete h3 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quiz-complete p {
    font-size: 1.3rem;
    margin-bottom: 30px;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .tabs {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .comparison {
        grid-template-columns: 1fr;
    }

    .scenario-selector {
        flex-direction: column;
    }

    .timeline-example {
        flex-direction: column;
        text-align: center;
    }

    .navigation-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .nav-btn {
        width: 100%;
    }

    .quiz-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
