/* Shared Styles for Hebrew Learning Games */

/* Email Capture Modal */
.email-capture-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.email-capture-modal {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.email-capture-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.email-capture-close:hover {
    color: #000;
}

.email-capture-content h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.email-capture-content p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.substack-embed {
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
}

.email-capture-privacy {
    font-size: 0.875rem;
    color: #999;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.email-capture-skip {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.875rem;
    padding: 0.5rem;
}

.email-capture-skip:hover {
    color: #000;
}

.email-capture-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #10b981;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.email-capture-toast.show {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Game Container Styles */
.game-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    padding-top: 6rem; /* Account for fixed header */
}

.game-header {
    text-align: center;
    margin-bottom: 2rem;
}

.game-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.game-header p {
    color: #666;
    font-size: 1.1rem;
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #3b82f6;
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Hebrew Text Styling */
.hebrew-text {
    font-family: 'SBL Hebrew', 'Ezra SIL', 'David', 'Arial Hebrew', serif;
    font-size: 2rem;
    direction: rtl;
    text-align: right;
    line-height: 1.6;
}

.hebrew-text-large {
    font-family: 'SBL Hebrew', 'Ezra SIL', 'David', 'Arial Hebrew', serif;
    font-size: 3rem;
    direction: rtl;
    text-align: center;
    line-height: 1.4;
}

/* Button Styles */
.game-button {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.game-button:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.game-button:active {
    transform: translateY(0);
}

.game-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.game-button-secondary {
    background: white;
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.game-button-secondary:hover {
    background: #eff6ff;
}

/* Score Display */
.score-display {
    text-align: center;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 8px;
    margin: 2rem 0;
}

.score-display h2 {
    margin-top: 0;
    color: #1a1a1a;
}

.score-value {
    font-size: 3rem;
    font-weight: bold;
    color: #10b981;
    margin: 1rem 0;
}

.score-percentage {
    font-size: 1.5rem;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-container {
        padding: 1rem;
    }

    .game-header h1 {
        font-size: 2rem;
    }

    .hebrew-text-large {
        font-size: 2rem;
    }

    .game-stats {
        gap: 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .email-capture-modal {
        padding: 1.5rem;
    }
}

/* Loading Spinner */
.loading-spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error Messages */
.message {
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    text-align: center;
}

.message-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.message-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Share Buttons */
.share-buttons {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.share-buttons-grid {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.share-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: 2px solid;
    background: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.share-twitter {
    border-color: #1da1f2;
    color: #1da1f2;
}

.share-twitter:hover {
    background: #e8f5fe;
}

.share-facebook {
    border-color: #1877f2;
    color: #1877f2;
}

.share-facebook:hover {
    background: #e7f3ff;
}

.share-copy {
    border-color: #6b7280;
    color: #6b7280;
}

.share-copy:hover {
    background: #f9fafb;
}

.share-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #10b981;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.share-toast.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .share-buttons-grid {
        flex-direction: column;
    }
    
    .share-button {
        width: 100%;
        justify-content: center;
    }
}

