/* Grammar Help Modal Styles */

.grammar-term {
    color: var(--primary-color);
    font-weight: bold;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    transition: all 0.2s;
}

.grammar-term:hover {
    color: #0056b3;
    text-decoration-style: solid;
}

.grammar-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.3s ease-in;
    overflow-y: auto;
}

.grammar-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
    position: relative;
}

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

.grammar-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.grammar-modal-close:hover {
    background: #f0f0f0;
    color: #000;
}

.grammar-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 20px 20px 0 0;
}

.grammar-modal-header h2 {
    margin: 0 0 10px 0;
    font-size: 1.8rem;
}

.grammar-modal-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

.grammar-modal-body {
    padding: 30px;
}

.grammar-section {
    margin-bottom: 30px;
}

.grammar-section:last-child {
    margin-bottom: 0;
}

.grammar-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.grammar-list,
.grammar-tips {
    list-style: none;
    padding: 0;
    margin: 0;
}

.grammar-list li,
.grammar-tips li {
    padding: 12px 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.grammar-example {
    background: #e7f3ff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    border-left: 4px solid #0d6efd;
}

.grammar-example:last-child {
    margin-bottom: 0;
}

.example-german {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.example-german .highlight {
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.example-french {
    font-size: 1rem;
    color: #666;
    font-style: italic;
    margin-bottom: 8px;
}

.example-note {
    font-size: 0.9rem;
    color: #28a745;
    font-weight: 600;
}

.grammar-modal-footer {
    padding: 20px 30px 30px;
    text-align: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .grammar-modal-overlay {
        padding: 10px;
        align-items: flex-start;
    }
    
    .grammar-modal-content {
        margin-top: 20px;
        margin-bottom: 20px;
        max-height: calc(100vh - 40px);
    }
    
    .grammar-modal-header {
        padding: 20px;
    }
    
    .grammar-modal-header h2 {
        font-size: 1.4rem;
    }
    
    .grammar-modal-body {
        padding: 20px;
    }
    
    .grammar-section h3 {
        font-size: 1.2rem;
    }
    
    .example-german {
        font-size: 1.1rem;
    }
}

/* Smooth scrolling for modal */
.grammar-modal-content {
    scroll-behavior: smooth;
}

/* Better touch targets on mobile */
.grammar-term {
    padding: 4px 8px;
    margin: -4px -8px;
    display: inline-block;
}

