/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fafbfc;
    color: #333;
    line-height: 1.6;
}

/* Navigation */
.navigation {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #667eea;
}

.game-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 20px;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #667eea;
}

.subtitle {
    font-size: 1.1rem;
    font-weight: 400;
    color: #666;
}

/* Game Card */
.game-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e1e5e9;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.clue-section {
    text-align: center;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e1e5e9;
}

.clue-number {
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 12px;
}

.clue-text {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
    color: #2d3748;
}

.clue-length {
    font-size: 0.95rem;
    color: #666;
    font-style: italic;
}

/* Answer Section */
.answer-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.answer-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 16px;
}

.letter-box {
    width: 45px;
    height: 45px;
    border: 2px solid #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 600;
    background: white;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.letter-box:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.letter-box.active {
    border-color: #667eea;
    background: #667eea;
    color: white;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

.letter-box.filled {
    border-color: #667eea;
    background: #f0f4ff;
    color: #667eea;
}

.letter-box.revealed {
    background: #ffeaa7;
    border-color: #fdcb6e;
    color: #e17055;
}

.check-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
}

/* Game Controls */
.game-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin: 16px 0 8px 0;
    flex-wrap: wrap;
}

.game-controls .btn {
    min-width: 120px;
    padding: 12px 16px;
    font-size: 0.95rem;
}

/* Hint Section */
.hint-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin: 8px 0;
}

.hint-text {
    background: #fff9e6;
    border: 1px solid #ffd93d;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    font-style: italic;
    color: #b8860b;
    max-width: 100%;
}

/* Score Section */
.score-section {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    font-weight: 600;
    margin: 8px 0 16px 0;
}

/* Virtual Keyboard */
.virtual-keyboard {
    margin-top: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e1e5e9;
}

.keyboard-row {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 8px;
}

.keyboard-row:last-child {
    margin-bottom: 0;
}

.key-btn {
    width: 40px;
    height: 48px;
    border: 1px solid #ccc;
    background: white;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.key-btn:hover {
    background: #e9ecef;
    border-color: #999;
    transform: translateY(-1px);
}

.key-btn:active {
    transform: translateY(0);
    background: #dee2e6;
}

.key-btn.key-used {
    background: #6c757d;
    color: white;
    border-color: #5a6268;
}

.key-btn.key-correct {
    background: #28a745;
    color: white;
    border-color: #1e7e34;
}

.key-btn.key-incorrect {
    background: #dc3545;
    color: white;
    border-color: #bd2130;
}

.key-backspace {
    width: 60px;
    background: #fd7e14;
    color: white;
    border-color: #e8590c;
}

.key-backspace:hover {
    background: #e8590c;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f1f3f4;
    color: #333;
    border: 1px solid #e1e5e9;
}

.btn-secondary:hover {
    background: #e1e5e9;
}

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

/* Hint Section */
.hint-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

/* Score Section */
.score-section {
    display: flex;
    justify-content: space-between;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    font-weight: 600;
}

.par-score {
    color: #28a745;
}

.current-score {
    color: #667eea;
}

/* Success Modal */
.success-modal {
    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: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-content h2 {
    color: #667eea;
    margin-bottom: 16px;
    font-size: 1.8rem;
}

.success-message {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #666;
}

.final-score {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}

.par-comparison {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #666;
}

.explanation {
    text-align: left;
    background: #fff9e6;
    border-left: 4px solid #ffd93d;
    padding: 16px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

/* Share Modal */
.share-modal {
    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: 1000;
    padding: 20px;
}

.share-text {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    margin: 20px 0;
    font-family: monospace;
    font-size: 0.9rem;
    white-space: pre-line;
    border: 1px solid #e1e5e9;
    color: #333;
}

.social-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 24px 0;
}

.social-btn {
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.facebook-btn {
    background: #1877f2;
    color: white;
}

.facebook-btn:hover {
    background: #166fe5;
    transform: translateY(-1px);
}

.twitter-btn {
    background: #1da1f2;
    color: white;
}

.twitter-btn:hover {
    background: #1a91da;
    transform: translateY(-1px);
}

.instagram-btn {
    background: #e4405f;
    color: white;
}

.instagram-btn:hover {
    background: #d62d55;
    transform: translateY(-1px);
}

.copy-btn {
    background: #28a745;
    color: white;
}

.copy-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

/* Stats Section */
.stats-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e1e5e9;
    margin-top: 16px;
}

.stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 16px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

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

.info-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding-top: 16px;
    border-top: 1px solid #e1e5e9;
}

.link-btn {
    background: none;
    border: none;
    color: #667eea;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.link-btn:hover {
    opacity: 0.8;
}

/* SEO Content Section */
.seo-content {
    background: white;
    margin: 40px 0;
    padding: 60px 0;
    border-top: 1px solid #e1e5e9;
}

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

.main-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #4a5568;
}

.main-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 24px;
    text-align: center;
}

.main-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin: 32px 0 16px 0;
}

.main-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin: 24px 0 12px 0;
}

.main-content p {
    margin-bottom: 16px;
}

.main-content strong {
    color: #667eea;
    font-weight: 600;
}

/* Footer */
.footer {
    background: #2d3748;
    color: white;
    padding: 40px 0 20px;
    margin-top: 40px;
}

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

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #cbd5e0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #4a5568;
}

/* Page Layout */
.page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    background: white;
    min-height: calc(100vh - 140px);
}

.breadcrumb {
    margin-bottom: 24px;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.page-content {
    line-height: 1.7;
}

.page-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.page-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2d3748;
    margin: 32px 0 16px 0;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
}

.page-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    margin: 24px 0 12px 0;
}

.page-content p {
    margin-bottom: 16px;
    color: #4a5568;
}

.page-content ul, .page-content ol {
    margin: 16px 0 16px 24px;
    color: #4a5568;
}

.page-content li {
    margin-bottom: 8px;
}

.page-content a {
    color: #667eea;
    text-decoration: none;
}

.page-content a:hover {
    text-decoration: underline;
}

.page-content section {
    margin-bottom: 32px;
}

.last-updated {
    font-style: italic;
    color: #666;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e1e5e9;
}

.contact-form {
    background: #f8f9fa;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e1e5e9;
    margin: 24px 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-submit {
    background: #667eea;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.form-submit:hover {
    background: #5a67d8;
}

/* Help Modal */
.help-modal .modal-content {
    max-width: 600px;
    text-align: left;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e1e5e9;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #f1f3f4;
    color: #333;
}

.help-content h3 {
    color: #667eea;
    margin: 20px 0 10px 0;
    font-size: 1.1rem;
}

.help-content ul {
    margin-left: 20px;
    margin-bottom: 16px;
}

.help-content li {
    margin-bottom: 8px;
}

/* Utility classes */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .game-container {
        padding: 16px;
        gap: 16px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .game-card {
        padding: 24px;
        gap: 20px;
    }
    
    .clue-text {
        font-size: 1.1rem;
    }
    
    .letter-box {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }
    
    .virtual-keyboard {
        margin-top: 20px;
        padding: 16px;
    }
    
    .key-btn {
        width: 35px;
        height: 44px;
        font-size: 0.9rem;
    }
    
    .key-backspace {
        width: 55px;
    }
    
    .check-controls {
        flex-direction: row;
        gap: 16px;
    }
    
    .game-controls {
        gap: 10px;
        margin: 16px 0;
    }
    
    .game-controls .btn {
        min-width: 100px;
        font-size: 0.9rem;
        padding: 10px 14px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .stats {
        gap: 12px;
    }
    
    .info-links {
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 12px;
    }
    
    .game-card {
        padding: 20px;
    }
    
    .title {
        font-size: 1.8rem;
    }
    
    .letter-box {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }
    
    .virtual-keyboard {
        padding: 12px;
    }
    
    .keyboard-row {
        gap: 4px;
    }
    
    .key-btn {
        width: 28px;
        height: 40px;
        font-size: 0.8rem;
    }
    
    .key-backspace {
        width: 45px;
    }
    
    .modal-content {
        padding: 24px;
    }
    
    .check-controls {
        flex-direction: column;
        gap: 12px;
    }
    
    .game-controls {
        flex-direction: column;
        gap: 12px;
        margin: 16px 0;
    }
    
    .game-controls .btn {
        min-width: 140px;
        padding: 14px 20px;
        font-size: 1rem;
    }
    
    .btn {
        padding: 14px 20px;
        font-size: 1rem;
    }
}