@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;900&family=Fredoka:wght@400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    padding-top: 70px;
    position: relative;
    overflow-x: hidden;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Arka Plan Harfler */
.background-letters {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-letter {
    position: absolute;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.08);
    pointer-events: none;
    animation: floatLetter linear infinite;
}

@keyframes floatLetter {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Üst Navigation Bar */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #121928;
    height: 60px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05);
}

.logo {
    height: 25px;
}

.nav-title {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* Başlık */
.title {
    text-align: center;
    font-family: 'Fredoka', sans-serif;
    font-size: 4.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 
        5px 5px 0 rgba(255, 107, 53, 0.8),
        -2px -2px 0 rgba(138, 43, 226, 0.6);
    margin-bottom: 40px;
    letter-spacing: 6px;
    animation: titleFloat 3s ease-in-out infinite;
}

@keyframes titleFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Harf Kartları */
.cards-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.card {
    background: white;
    width: 110px;
    height: 150px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.35);
}

.card.vowel {
    color: #ff6b35;
    background: linear-gradient(135deg, #FFF5E1 0%, #FFE4B5 100%);
    border: 3px solid #ff8c42;
}

.card.consonant {
    color: #6a5acd;
    background: linear-gradient(135deg, #E6E6FA 0%, #D8BFD8 100%);
    border: 3px solid #8a7fdc;
}

.card.hidden {
    color: #888;
    background: linear-gradient(135deg, #f0f0f0 0%, #d0d0d0 100%);
    border: 3px solid #999;
}

/* Zamanlayıcı Bölümü */
.timer-section {
    background: linear-gradient(135deg, #FF6B9D 0%, #C06C84 100%);
    border-radius: 25px;
    padding: 35px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(192, 108, 132, 0.4);
    border: 4px solid rgba(255, 255, 255, 0.3);
}

.timer-display {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.time {
    font-size: 6rem;
    font-weight: bold;
    color: white;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    min-width: 150px;
    text-align: center;
}

.timer-labels {
    display: flex;
    justify-content: center;
    gap: 120px;
    margin-bottom: 20px;
}

.label {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-transform: capitalize;
}

/* Kontrol Butonları */
.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.control-btn {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 12px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.control-btn:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.play-btn {
    background: linear-gradient(135deg, #00D084 0%, #00A67E 100%);
    color: white;
}

.pause-btn {
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    color: white;
}

.stop-btn {
    background: linear-gradient(135deg, #FF6B6B 0%, #EE5A6F 100%);
    color: white;
}

.search-btn {
    background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%);
    color: white;
    font-size: 1.8rem;
}

.settings-btn {
    background: linear-gradient(135deg, #667eea 0%, #5568d3 100%);
    color: white;
    font-size: 1.8rem;
}

/* Ayarlar Modal */
.settings-modal {
    max-width: 500px;
}

.settings-content {
    padding: 20px 0;
}

.setting-item {
    margin-bottom: 30px;
}

.setting-item label {
    display: block;
    font-size: 1.3rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 15px;
    text-align: center;
}

.time-inputs-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.time-input-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.time-input-box label {
    font-size: 0.9rem;
    color: #888;
    text-align: center;
    margin-bottom: 0;
}

.time-separator {
    font-size: 3rem;
    font-weight: bold;
    color: #667eea;
    padding: 0 10px;
}

.time-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.time-btn {
    width: 50px;
    height: 50px;
    font-size: 2rem;
    font-weight: bold;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.time-btn:hover {
    background: #5568d3;
    transform: scale(1.1);
}

.time-input-group input {
    width: 80px;
    padding: 12px;
    font-size: 1.5rem;
    font-weight: bold;
    border: 3px solid #667eea;
    border-radius: 12px;
    text-align: center;
    color: #667eea;
}

.time-presets {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.preset-btn {
    padding: 10px 20px;
    font-size: 1.1rem;
    font-weight: bold;
    background: #f0f0f0;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preset-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.preset-btn.active {
    background: #667eea;
    color: white;
}

.save-settings-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.3rem;
    font-weight: bold;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.save-settings-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}



/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #000;
}

.modal-content h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.8rem;
    font-family: 'Fredoka', sans-serif;
}

/* Kelime Arama Modal */
.search-modal {
    max-width: 500px;
}

.search-content {
    padding: 20px 0;
}

.search-content .input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-content .input-group input {
    flex: 1;
    padding: 15px 20px;
    font-size: 1.3rem;
    font-family: 'Poppins', sans-serif;
    border: 3px solid #667eea;
    border-radius: 12px;
    text-transform: uppercase;
    text-align: center;
    font-weight: bold;
}

/* İ harfi düzeltmesi */
.search-content .input-group input::placeholder {
    text-transform: none;
    font-weight: normal;
}

.modal-result {
    min-height: 60px;
    font-size: 1.3rem;
    font-weight: bold;
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.modal-result.valid {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 3px solid #28a745;
}

.modal-result.invalid {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 3px solid #dc3545;
}

.modal-result.checking {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border: 3px solid #17a2b8;
}

/* Süre Bitti Modal */
.time-up-modal {
    background-color: rgba(0, 0, 0, 0.95);
}

.time-up-content {
    max-width: 700px;
    text-align: center;
    background: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
    color: white;
    border: 5px solid #BDC3C7;
    border-radius: 20px;
    padding: 40px;
}

.time-up-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: ring 1s ease-in-out infinite;
}

@keyframes ring {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
}

.time-up-content h2 {
    color: white;
    font-size: 2.8rem;
    margin-bottom: 20px;
    font-family: 'Fredoka', sans-serif;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
}

.time-up-content p {
    font-size: 1.3rem;
    margin-bottom: 35px;
    opacity: 0.95;
    font-weight: 500;
}

.time-up-letters {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 12px;
    margin: 30px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    overflow-x: auto;
}

.time-up-letters .card {
    width: 50px;
    height: 50px;
    font-size: 1.6rem;
    font-weight: bold;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.time-up-letters .card.vowel {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
}

.time-up-letters .card.consonant {
    background: linear-gradient(135deg, #87CEEB 0%, #4682B4 100%);
}

.time-up-search {
    margin: 20px 0;
}

.time-up-search .input-group {
    margin-bottom: 15px;
}

.time-up-search input {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    border: 3px solid rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: #2C3E50;
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
}

.time-up-search input:focus {
    outline: none;
    border-color: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.time-up-result {
    min-height: 30px;
    font-size: 1rem;
    font-weight: bold;
    padding: 8px;
    border-radius: 6px;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.time-up-result.valid {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: 2px solid #28a745;
}

.time-up-result.invalid {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
    color: white;
    border: 2px solid #dc3545;
}

.time-up-result.checking {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border: 2px solid #17a2b8;
}

.time-up-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.time-up-buttons button {
    padding: 18px 40px;
    font-size: 1.3rem;
    font-weight: bold;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.btn-new-game {
    background: white;
    color: #C06C84;
}

.btn-new-game:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
}

.btn-close {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

/* Confirm Modal */
.confirm-modal {
    max-width: 500px;
    text-align: center;
}

.confirm-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.confirm-modal h2 {
    color: #667eea;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.confirm-modal p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
}

.confirm-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.confirm-buttons button {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.btn-confirm-yes {
    background: linear-gradient(135deg, #FF6B6B 0%, #EE5A6F 100%);
    color: white;
}

.btn-confirm-yes:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(238, 90, 111, 0.4);
}

.btn-confirm-no {
    background: linear-gradient(135deg, #00D084 0%, #00A67E 100%);
    color: white;
}

.btn-confirm-no:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 208, 132, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-title {
        font-size: 1.1rem;
        letter-spacing: 1px;
    }
    
    .title {
        font-size: 2.5rem;
        margin-bottom: 30px;
        letter-spacing: 3px;
    }

    .card {
        width: 80px;
        height: 110px;
        font-size: 3rem;
    }

    .cards-container {
        gap: 10px;
    }

    .time {
        font-size: 4rem;
        min-width: 100px;
    }

    .label {
        font-size: 1rem;
    }

    .timer-labels {
        gap: 60px;
    }

    .control-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .settings-btn {
        font-size: 1.5rem;
    }

    .logo {
        height: 40px;
    }

    .words-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .nav-content {
        padding: 0 15px;
    }
    
    .logo {
        height: 28px;
    }
    
    .nav-title {
        font-size: 0.9rem;
    }
    
    .title {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .card {
        width: 60px;
        height: 90px;
        font-size: 2.2rem;
    }

    .time {
        font-size: 3rem;
        min-width: 80px;
    }

    .timer-labels {
        gap: 40px;
    }
    
    .control-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .time-input-group input {
        width: 100px;
        font-size: 1.5rem;
    }
    
    .time-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
}
