/* ═══════════════════════════════════════════════════════════════════
   PAST PERFECT TENSE - TOPIC SPECIFIC STYLES
   Category: Tenses - Color Scheme: #4caf50 (Green)
   Extends shared.css with Past Perfect Tense specific styling
   ═══════════════════════════════════════════════════════════════════ */

/* ─── CATEGORY COLOR OVERRIDE ─── */
:root {
    --category-primary: #4caf50;           /* Green primary for tenses */
    --category-primary-rgb: 76, 175, 80;
    --tenses-primary: #4caf50;
    --tenses-primary-dark: #388e3c;        /* Dark green */
    --tenses-secondary: #66bb6a;           /* Light green */
    --regular-verb: #2196f3;               /* Blue for regular verbs */
    --irregular-verb: #ff5722;             /* Orange for irregular verbs */
    --past-perfect-accent: #6a1b9a;        /* Purple for past perfect (deeper past) */
    --sequence-accent: #9c27b0;            /* Light purple for sequence emphasis */
}

/* ─── ENHANCED GRAMMAR ELEMENT HIGHLIGHTING ─── */
.verb {
    color: var(--tenses-primary-dark);
}

.aux {
    color: var(--past-perfect-accent);
    font-weight: 600;
}

/* ─── INTERACTIVE VERB GRID - TOPIC SPECIFIC ─── */
.verb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.verb-card {
    background: var(--surface);
    border: 2px solid var(--tenses-primary);
    border-radius: var(--card-radius);
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.verb-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--tenses-primary), var(--past-perfect-accent));
}

/* ─── REGULAR VS IRREGULAR VERB STYLING ─── */
.verb-card.regular {
    border-color: var(--regular-verb);
}

.verb-card.regular::before {
    background: linear-gradient(90deg, var(--regular-verb), var(--past-perfect-accent), #64b5f6);
}

.verb-card.irregular {
    border-color: var(--irregular-verb);
}

.verb-card.irregular::before {
    background: linear-gradient(90deg, var(--irregular-verb), var(--past-perfect-accent), #ff7043);
}

.verb-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(106, 27, 154, 0.2);
}

.verb-card.regular:hover {
    border-color: #1976d2;
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.2);
}

.verb-card.irregular:hover {
    border-color: #d84315;
    box-shadow: 0 8px 25px rgba(255, 87, 34, 0.2);
}

.verb-card.active {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(106, 27, 154, 0.25);
}

.verb-card.regular.active {
    border-color: #1976d2;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.05), rgba(106, 27, 154, 0.08));
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.2);
}

.verb-card.irregular.active {
    border-color: #d84315;
    background: linear-gradient(135deg, rgba(255, 87, 34, 0.05), rgba(106, 27, 154, 0.08));
    box-shadow: 0 8px 25px rgba(255, 87, 34, 0.2);
}

.base-verb {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--tenses-primary-dark);
    text-align: center;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.verb-card.regular .base-verb {
    color: var(--regular-verb);
}

.verb-card.irregular .base-verb {
    color: var(--irregular-verb);
}

.verb-type {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--past-perfect-accent);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.verb-forms {
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
}

.verb-card.active .verb-forms {
    opacity: 1;
    max-height: 200px;
}

.form-positive,
.form-negative,
.form-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    background: var(--background);
    border-left: 3px solid var(--tenses-primary);
}

.form-positive {
    border-left-color: var(--past-perfect-accent);
}

.form-negative {
    border-left-color: #f44336;
}

.form-question {
    border-left-color: #ff9800;
}

.form-label {
    font-weight: 600;
    color: var(--grey);
    font-size: 0.9rem;
}

.form-result {
    font-weight: 700;
    color: var(--on-surface);
    font-size: 1rem;
}

/* ─── CLICK INSTRUCTION ─── */
.verb-card::after {
    content: 'Click to see past perfect';
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: var(--grey);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.verb-card.active::after {
    content: 'Click to hide';
}

.verb-card:hover::after {
    opacity: 1;
}

/* ─── USAGE RULE BOX OVERRIDES ─── */
.usage-rule-box h4 {
    color: var(--tenses-primary-dark);
    border-bottom: 1px solid var(--tenses-primary);
    padding-bottom: 5px;
    margin-bottom: 10px;
}

/* ─── INTERACTIVE EXAMPLES ─── */
.interactive-example {
    margin: 15px 0;
    padding: 15px;
    background: rgba(76, 175, 80, 0.05);
    border-left: 4px solid var(--tenses-primary);
    border-radius: 0 var(--card-radius) var(--card-radius) 0;
}

.interactive-example .example-title {
    font-weight: 700;
    color: var(--tenses-primary);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.interactive-example .sentence {
    margin: 8px 0;
    padding: 8px 0;
    font-size: 1rem;
    line-height: 1.5;
}

/* ─── MISTAKE EXAMPLES ─── */
.mistake-example {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 10px 0;
    padding: 12px;
    border-radius: var(--card-radius);
    border-left: 4px solid transparent;
}

.mistake-example.wrong {
    background: rgba(244, 67, 54, 0.1);
    border-left-color: #f44336;
}

.mistake-example.correct {
    background: rgba(76, 175, 80, 0.1);
    border-left-color: var(--tenses-primary);
}

.mistake-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.mistake-example.correct .mistake-icon {
    color: var(--tenses-primary);
}

.mistake-example.wrong .mistake-icon {
    color: #f44336;
}

.mistake-text {
    flex: 1;
}

.mistake-text strong {
    font-weight: 700;
}

/* ─── MOBILE RESPONSIVE ─── */
@media (max-width: 768px) {
    .verb-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .verb-card {
        padding: 15px;
    }
    
    .base-verb {
        font-size: 1.3rem;
        margin-bottom: 6px;
    }
    
    .verb-type {
        font-size: 0.8rem;
        margin-bottom: 12px;
    }
    
    .form-positive,
    .form-negative,
    .form-question {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .form-label {
        font-size: 0.85rem;
    }
    
    .form-result {
        font-size: 0.95rem;
    }
    
    .interactive-example {
        padding: 12px;
    }
    
    .interactive-example .example-title {
        font-size: 1rem;
    }
    
    .mistake-example {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .verb-card {
        padding: 12px;
    }
    
    .base-verb {
        font-size: 1.2rem;
    }
    
    .verb-type {
        font-size: 0.75rem;
    }
    
    .verb-card::after {
        font-size: 0.75rem;
        bottom: 8px;
    }
    
    .interactive-example {
        padding: 10px;
        margin: 10px 0;
    }
    
    .interactive-example .example-title {
        font-size: 0.95rem;
    }
}