/* UNO Game Styles v2.0 - Mobil Optimizasyonlu */
@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Source+Sans+Pro:wght@400;700;900&display=swap');

:root {
    --red: #C11F1F;
    --blue: #3F4CFF;
    --green: #3E9E32;
    --yellow: #DED71F;
    --black: #111;
    --bg-gradient: linear-gradient(-45deg, #1e3c72, #2a5298, #2ecc71, #2c3e50);
}

* { 
    box-sizing: border-box; 
    user-select: none; 
    -webkit-tap-highlight-color: transparent; 
    -webkit-touch-callout: none;
}

html {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    position: fixed;
    overflow: hidden;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0; 
    padding: 0;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    font-family: 'Source Sans Pro', sans-serif;
    background: var(--bg-gradient); 
    background-size: 400% 400%; 
    background-attachment: fixed;
    animation: gradientBG 20s ease infinite;
    color: white; 
    display: flex; 
    flex-direction: column;
    overscroll-behavior: none;
    touch-action: pan-y pinch-zoom;
}
@keyframes gradientBG { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- ORTAK ARAYÜZ --- */
.screen { 
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0;
    bottom: 0;
    width: 100vw; 
    height: 100vh;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    transition: opacity 0.3s;
    overflow: hidden;
    background: inherit;
}
.hidden { 
    display: none !important; 
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
.game-logo { font-family: 'Fredoka One', cursive; font-size: 4rem; color: var(--yellow); text-shadow: 4px 4px 0 #000; margin-bottom: 20px; }
.input-field { width: 80%; max-width: 300px; padding: 15px; margin: 10px 0; border: none; border-radius: 50px; font-size: 1.1rem; text-align: center; background: rgba(255,255,255,0.9); font-weight: bold; color: #333; }
.btn-main { width: 80%; max-width: 300px; padding: 18px; margin: 15px 0; font-size: 1.2rem; font-weight: bold; border: none; border-radius: 50px; color: white; background: #333; cursor: pointer; text-transform: uppercase; box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.btn-green { background: var(--green); }
.lobby-box { width: 90%; max-width: 400px; background: rgba(0,0,0,0.3); border-radius: 20px; padding: 20px; max-height: 50vh; overflow-y: auto; backdrop-filter: blur(5px); }
#lobby-player-list li { padding: 12px; margin-bottom: 8px; background: rgba(255,255,255,0.15); border-radius: 10px; display: flex; justify-content: space-between; align-items: center; }

/* --- PURE CSS UNO KART TASARIMI (CodePen Port) --- */
/* Kartın Base Boyutu: Mobilde optimize */
.card-container {
    width: 65px; 
    height: 104px; 
    position: relative; 
    display: inline-block; 
    margin: 2px;
    transition: transform 0.2s; 
    cursor: pointer;
    touch-action: manipulation;
}

/* Masa üzerinde kartlar */
#discard-pile .card-container {
    transform: scale(1.15);
    cursor: default;
}

.card {
    width: 100%; height: 100%;
    border-radius: 8px;
    position: relative;
    font-family: Tahoma, sans-serif;
    box-shadow: -1px 2px 4px rgba(0,0,0,0.35), 0 1px 2px rgba(0,0,0,0.2);
    overflow: hidden;
}

/* Renkler */
.card.green { background-color: var(--green); }
.card.blue { background-color: var(--blue); }
.card.red { background-color: var(--red); }
.card.yellow { background-color: var(--yellow); }
.card.black { background-color: var(--black); }

/* Beyaz Oval (Ellipse) - Düzgün oval, yamuk değil */
.ellipse {
    background-color: white;
    width: 52px;
    height: 84px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 1;
}

/* İçerik Konumlandırma */
.content {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px; 
    font-weight: bold;
    z-index: 2;
    line-height: 1;
}

/* Renk Mirası */
.card.green .content { color: var(--green); }
.card.blue .content { color: var(--blue); }
.card.red .content { color: var(--red); }
.card.yellow .content { color: var(--yellow); }
.card.black .content { color: black; }

/* Köşe Yazıları */
.small-content, .small-content-reverse {
    position: absolute;
    font-size: 8px; 
    color: white; 
    font-weight: bold;
    z-index: 3;
    line-height: 1;
}
.small-content { top: 3px; left: 3px; }
.small-content-reverse { bottom: 3px; right: 3px; transform: rotate(180deg); }

/* --- ÖZEL SEMBOLLER (CSS DRAWING) --- */

/* SKIP SEMBOLÜ */
.skip-symbol {
    width: 35px; 
    height: 35px;
    border: 7px solid currentColor;
    border-radius: 50%;
    position: relative;
}
.skip-symbol::before {
    content: ''; 
    display: block;
    width: 140%; 
    height: 7px;
    background-color: currentColor;
    position: absolute; 
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* Küçük Skip */
.small-content .skip-symbol, 
.small-content-reverse .skip-symbol {
    width: 6px; 
    height: 6px; 
    border-width: 1.2px;
    border-color: white;
    margin: 0;
}
.small-content .skip-symbol::before, 
.small-content-reverse .skip-symbol::before {
    height: 1.2px; 
    width: 140%;
    background-color: white;
}


/* PLUS TWO SEMBOLÜ */
.plus-two-symbol { 
    position: relative; 
    width: 35px; 
    height: 45px;
    display: inline-block;
}
.plus-two-symbol::before, 
.plus-two-symbol::after {
    content: ''; 
    display: block;
    width: 17px; 
    height: 28px;
    background-color: currentColor;
    border-radius: 1.5px; 
    border: 1.5px solid white;
    position: absolute;
}
.plus-two-symbol::before { 
    left: 50%; 
    top: 0;
    transform: translateX(-65%);
    z-index: 1; 
}
.plus-two-symbol::after { 
    top: 14px; 
    left: 50%;
    transform: translateX(-35%);
    z-index: 2; 
}

.small-content .plus-two-text,
.small-content-reverse .plus-two-text { 
    font-size: 8px;
    color: white;
}


/* REVERSE SEMBOLÜ */
.reverse-symbol {
    width: 35px; 
    height: 35px;
    position: relative;
    display: inline-block;
}
.arrows { 
    display: inline-block; 
    transform: rotate(-45deg); 
    width: 100%; 
    height: 100%; 
    position: relative; 
}
.arrow {
    width: 7px; 
    height: 7px; 
    background-color: currentColor;
    position: absolute;
}
.arrow::before {
    content: ''; 
    display: block;
    width: 7px; 
    height: 7px;
    background-color: inherit;
    border-top-left-radius: 100%;
    position: absolute;
    left: -6.3px;
    top: 0;
}
.arrow::after {
    content: ''; 
    display: block;
    width: 0; 
    height: 0;
    border: 7px solid currentColor;
    border-top-color: transparent;
    border-bottom-color: transparent;
    border-right: none;
    position: absolute;
    right: -6.3px;
    top: -3.5px;
}
.arrow:nth-child(1) { 
    top: 3.5px; 
    left: 17.5px; 
}
.arrow:nth-child(2) { 
    bottom: 3.5px; 
    left: 3.5px; 
    transform: rotate(180deg); 
}

/* Küçük Reverse */
.small-content .reverse-symbol, 
.small-content-reverse .reverse-symbol {
    width: 9px; 
    height: 9px;
    margin: 0;
}
.small-content .arrow, 
.small-content-reverse .arrow { 
    background-color: white; 
    width: 2.2px; 
    height: 2.2px; 
}
.small-content .arrow::before, 
.small-content-reverse .arrow::before { 
    width: 2.2px;
    height: 2.2px;
    left: -2px;
}
.small-content .arrow::after, 
.small-content-reverse .arrow::after { 
    border-color: white; 
    border-top-color: transparent; 
    border-bottom-color: transparent; 
    border-right: none; 
    border-width: 2.2px; 
    right: -2px;
    top: -1.1px;
}
.small-content .arrow:nth-child(1) { 
    top: 1.1px; 
    left: 4.5px; 
}
.small-content .arrow:nth-child(2) { 
    bottom: 1.1px; 
    left: 1.1px; 
}
.small-content-reverse .arrow:nth-child(1) { 
    top: 1.1px; 
    left: 4.5px; 
}
.small-content-reverse .arrow:nth-child(2) { 
    bottom: 1.1px; 
    left: 1.1px; 
}


/* WILD SEMBOLÜ */
.wild-symbol {
    width: 45px; 
    height: 73px; 
    border-radius: 50%;
    overflow: hidden; 
    border: 1.5px solid white;
    display: inline-flex; 
    flex-wrap: wrap;
    vertical-align: middle;
}
.wild-segment { 
    width: 50%; 
    height: 50%; 
    font-size: 0; /* Boşlukları kaldır */
}
.wild-segment.yellow { background: var(--yellow); }
.wild-segment.green { background: var(--green); }
.wild-segment.blue { background: var(--blue); }
.wild-segment.red { background: var(--red); }

/* Küçük Wild */
.small-content .wild-symbol, 
.small-content-reverse .wild-symbol {
    width: 7px; 
    height: 11.4px; 
    border-width: 0.4px; 
    margin: 0;
}


/* PLUS FOUR SEMBOLÜ */
.plus-four-symbol {
    position: relative; 
    width: 45px; 
    height: 73px;
    display: inline-block;
    vertical-align: middle;
}
.mini-card {
    width: 14px; 
    height: 22.4px; 
    border-radius: 10%; 
    border: 1.8px solid white;
    position: absolute;
}
.mini-card.green { 
    background: var(--green); 
    top: 50%; 
    left: 1.8px; 
    z-index: 1;
}
.mini-card.blue { 
    background: var(--blue); 
    top: 25%; 
    left: 8.8px; 
    z-index: 2;
}
.mini-card.red { 
    background: var(--red); 
    top: 35%; 
    left: 15.8px; 
    z-index: 3;
}
.mini-card.yellow { 
    background: var(--yellow); 
    top: 10%; 
    left: 22.8px; 
    z-index: 4;
}

.small-content .plus-four-text,
.small-content-reverse .plus-four-text { 
    font-size: 8px;
    color: white;
}


/* --- OYUN EKRANI DÜZENİ (Responsive) --- */
#game-screen { 
    justify-content: flex-start; 
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    background: inherit;
}

/* iOS için safe area desteği */
@supports(padding: max(0px)) {
    #game-screen {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

/* Header - Log ve Ses */
#game-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 8px 10px !important;
    z-index: 100 !important;
    pointer-events: none !important;
    background: rgba(0,0,0,0.3) !important;
    backdrop-filter: blur(5px) !important;
    height: 54px !important;
}

#game-header > * {
    pointer-events: all !important;
}

/* Oyun Geçmişi Toggle */
#game-log-toggle,
#sound-toggle,
#fullscreen-toggle {
    background: rgba(0,0,0,0.5) !important;
    backdrop-filter: blur(10px) !important;
    border: none !important;
    border-radius: 50% !important;
    width: 38px !important;
    height: 38px !important;
    font-size: 1.15rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
}

#game-log-toggle:active,
#sound-toggle:active,
#fullscreen-toggle:active {
    transform: scale(0.95) !important;
}

#fullscreen-toggle {
    font-size: 1.25rem !important;
}

/* Oyun Geçmişi Paneli */
#game-log-panel {
    position: fixed !important;
    top: 65px !important;
    left: 10px !important;
    width: 280px;
    max-height: 400px;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    z-index: 95 !important;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.15);
    transition: all 0.3s ease;
}

#game-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

#game-log-header span {
    font-weight: bold;
    color: white;
    font-size: 0.95rem;
}

#game-log-header button {
    background: none;
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transition: background 0.2s;
}

#game-log-header button:hover {
    background: rgba(255,255,255,0.15);
}

#game-log-content {
    max-height: 350px;
    overflow-y: auto;
    padding: 12px;
}

.log-item {
    padding: 10px 12px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 3px solid rgba(255,255,255,0.2);
}

.log-player {
    font-weight: bold;
    color: var(--yellow);
    min-width: 70px;
}

.log-card {
    font-weight: 600;
}

.log-draw {
    color: rgba(255,255,255,0.7);
    font-style: italic;
}

.log-empty {
    text-align: center;
    padding: 20px;
    color: rgba(255,255,255,0.5);
    font-style: italic;
}

/* Hızlı Mesajlar - Üstte sağda */
#quick-messages {
    position: fixed !important;
    top: 65px !important;
    right: 10px !important;
    display: flex;
    flex-direction: row;
    gap: 6px;
    z-index: 95 !important;
    padding: 6px;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
    border-radius: 25px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.quick-msg-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(5px);
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid rgba(255,255,255,0.35);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.quick-msg-btn:hover {
    transform: scale(1.05);
    background: rgba(255,255,255,0.35);
}

.quick-msg-btn:active {
    transform: scale(1.15);
    background: rgba(255,255,255,0.5);
}

/* Mesaj Bildirimleri */
#message-container {
    position: fixed !important;
    top: 120px !important;
    right: 10px !important;
    width: 280px;
    z-index: 90 !important;
    pointer-events: none !important;
}

.player-message {
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    color: white;
    padding: 10px 16px;
    border-radius: 18px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.player-message.show {
    opacity: 1;
    transform: translateY(0);
}

.player-message strong {
    color: var(--yellow);
    margin-right: 6px;
}

/* iOS için safe area desteği */
@supports(padding: max(0px)) {
    #game-screen {
        padding-top: max(0px, env(safe-area-inset-top));
        padding-bottom: max(0px, env(safe-area-inset-bottom));
    }
    
    #my-hand-container {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}

/* Üst Bar */
#opponents-strip {
    width: 100%; 
    min-height: 65px !important;
    max-height: 65px !important;
    background: rgba(255,255,255,0.08); 
    backdrop-filter: blur(10px);
    display: flex; 
    align-items: center; 
    justify-content: flex-start;
    overflow-x: auto; 
    overflow-y: hidden;
    padding: 6px 8px;
    gap: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    flex-shrink: 0;
    margin-top: 54px !important;
}

.opponent-chip {
    display: flex; 
    flex-direction: column; 
    align-items: center;
    padding: 5px 8px; 
    background: rgba(0,0,0,0.3); 
    border-radius: 10px; 
    border: 2px solid rgba(255,255,255,0.12);
    min-width: 52px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.opponent-chip.active-turn { 
    border-color: var(--yellow); 
    background: rgba(255,223,0,0.2); 
    transform: scale(1.04);
    box-shadow: 0 0 12px rgba(255,223,0,0.4);
}

.opp-avatar { 
    width: 32px; 
    height: 32px; 
    border-radius: 50%; 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    font-weight: bold; 
    font-size: 0.9rem;
    border: 2px solid white; 
    position: relative;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.opp-count { 
    position: absolute; 
    bottom: -4px; 
    right: -4px; 
    background: var(--red); 
    color: white; 
    font-size: 0.6rem; 
    font-weight: bold;
    padding: 2px 4px; 
    border-radius: 8px; 
    border: 1.5px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    min-width: 16px;
    text-align: center;
    line-height: 1;
}

.opp-name { 
    font-size: 0.7rem; 
    margin-top: 4px; 
    color: white; 
    font-weight: 600;
    max-width: 52px; 
    overflow: hidden; 
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Masa (Orta) */
#game-table { 
    flex: 1 !important; 
    width: 100%; 
    display: flex !important; 
    flex-direction: column !important; 
    align-items: center !important; 
    justify-content: flex-start !important; /* Yukarıdan başla */
    padding: 20px 8px 200px 8px !important; /* Üstte daha fazla boşluk */
    min-height: 0;
    overflow: hidden;
    touch-action: none;
    margin-top: 65px !important; /* Opponents strip için */
    padding-top: 50px !important; /* Ortadaki kartı daha yukarı çıkar */
}

#discard-pile {
    width: 95px; 
    height: 95px;
    display: flex; 
    justify-content: center; 
    align-items: center;
    position: relative;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    padding: 5px;
    margin-bottom: 5px;
}

/* Son oynanan kart gösterimi */
#last-played-card {
    display: none;
    flex-direction: column;
    align-items: center;
    margin-bottom: 8px;
    animation: slideDown 0.3s ease;
}

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

#status-text { 
    margin-top: 10px; 
    font-size: 1rem; 
    font-weight: 800; 
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
    text-align: center;
    padding: 0 12px;
    line-height: 1.2;
}

#color-info { 
    margin-top: 5px; 
    font-weight: bold; 
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    padding: 5px 14px;
    background: rgba(0,0,0,0.35);
    border-radius: 14px;
    backdrop-filter: blur(5px);
}

/* Butonlar - Game table içinde, discard pile'ın altında */
#action-area { 
    position: relative !important; /* Fixed yerine relative */
    width: 100% !important;
    min-height: 50px;
    max-height: 50px;
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 10px;
    padding: 10px 12px !important;
    margin-top: 15px !important; /* Discard pile'dan sonra */
    margin-bottom: 0 !important;
    flex-shrink: 0;
    touch-action: none;
    z-index: 45;
    pointer-events: all;
}

/* Desktop için action-area'yı kartların üstünde tut */
@media (min-width: 768px) {
    #action-area {
        margin-bottom: 140px !important; /* Kartlar için yer bırak */
    }
    
    #game-table {
        padding-bottom: 140px !important; /* Desktop'ta daha az padding */
    }
}

.game-btn { 
    padding: 9px 20px; 
    border-radius: 20px; 
    border: none; 
    background: var(--blue); 
    color: white; 
    font-weight: 700; 
    box-shadow: 0 3px 10px rgba(0,0,0,0.3); 
    font-size: 0.85rem; 
    border: 2px solid rgba(255,255,255,0.3); 
    cursor: pointer; 
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-transform: uppercase;
    letter-spacing: 0.2px;
    min-width: 100px;
    white-space: nowrap;
    touch-action: manipulation;
    position: relative;
    overflow: hidden;
}

.game-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.game-btn:active::before {
    width: 300px;
    height: 300px;
}

.game-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 5px 14px rgba(0,0,0,0.4);
}

.game-btn:active { 
    transform: scale(0.97); 
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.btn-pass { 
    background: var(--red); 
}

/* Mobil için buton boyutları */
@media (max-width: 767px) {
    #action-area {
        position: relative !important; /* Fixed değil, relative */
        bottom: auto !important;
        min-height: 50px;
        max-height: 50px;
        gap: 8px;
        padding: 8px 10px !important;
        margin-top: 12px !important; /* Discard pile'dan sonra */
        margin-bottom: 0 !important;
    }
    
    #game-table {
        padding-bottom: 180px !important; /* Mobilde kartlar için yer (action-area artık içinde) */
        padding-top: 40px !important; /* Ortadaki kartı daha yukarı çıkar */
        margin-bottom: 0 !important;
    }
    
    #my-hand-container {
        height: 120px !important;
        min-height: 120px !important;
        max-height: 120px !important;
    }
    
    #action-area {
        margin-top: 12px !important; /* Discard pile'dan sonra */
        margin-bottom: 0 !important;
    }
    
    #discard-pile {
        margin-bottom: 8px !important;
    }
    
    #last-played-card {
        margin-bottom: 5px !important;
    }
    
    #my-hand-container {
        height: 120px;
        min-height: 120px;
        max-height: 120px;
    }
    
    .game-btn {
        padding: 8px 18px;
        font-size: 0.8rem;
        min-width: 100px;
        letter-spacing: 0.1px;
        border-radius: 18px;
        font-weight: 800;
    }
}

/* Elim (Alt) - Fixed position mobil için */
#my-hand-container {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 118px;
    min-height: 118px;
    max-height: 118px;
    background: rgba(0,0,0,0.3); 
    backdrop-filter: blur(5px);
    border-top: 1px solid rgba(255,255,255,0.25);
    display: flex; 
    align-items: center;
    overflow-x: auto; 
    overflow-y: hidden;
    padding: 8px 6px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    gap: 0;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    flex-shrink: 0;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    z-index: 50;
}

/* Kartlar için scroll snap */
#my-hand-container .card-container {
    scroll-snap-align: start;
}

/* Scrollbar gizle (mobil için) */
#my-hand-container::-webkit-scrollbar {
    display: none;
}
#my-hand-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Mobil için kartlar arası overlap */
.card-container { 
    flex-shrink: 0;
    margin-right: -18px; /* Daha az overlap */
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), z-index 0s, margin 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.card-container:last-child {
    margin-right: 6px;
}

.card-container:hover { 
    transform: translateY(-25px) scale(1.08);
    z-index: 100;
    margin-right: 5px;
    margin-left: 5px;
}

.card-container:active {
    transform: translateY(-30px) scale(1.12);
    z-index: 100;
    margin-right: 4px;
    margin-left: 4px;
}

/* Dokunmatik geri bildirim için özel sınıf */
.card-container.touching {
    transform: translateY(-35px) scale(1.15);
    z-index: 101;
    filter: brightness(1.15);
}

/* Mobil için kart dokunma feedback */
@media (max-width: 767px) {
    .card-container:active {
        transform: translateY(-40px) scale(1.2) !important;
        z-index: 102 !important;
        filter: brightness(1.3) !important;
        transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    }
    
    /* Çift dokunma için görsel feedback */
    .card-container.double-tap {
        animation: doubleTapPulse 0.3s ease;
    }
    
    @keyframes doubleTapPulse {
        0%, 100% { transform: scale(1); }
        50% { transform: scale(1.25); }
    }
}

/* Mobil optimizasyon */
@media (max-width: 767px) {
    html, body {
        min-height: 100vh;
        min-height: -webkit-fill-available;
        background-attachment: fixed;
    }
    
    .screen {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
    
    #game-screen {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
    
    #my-hand-container {
        gap: 0;
        padding: 10px 8px;
        min-height: 120px;
        max-height: 125px;
    }
    
    .card-container {
        width: 68px;
        height: 108px;
        margin-right: -15px; /* Daha kompakt */
    }
    
    .card-container:last-child {
        margin-right: 8px;
    }
    
    .card-container:active {
        margin-right: 4px;
        margin-left: 4px;
        transform: translateY(-35px) scale(1.15);
        transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    
    /* Mobil için kartlar yumuşak kaydırma efekti */
    @keyframes slideInCard {
        from {
            opacity: 0;
            transform: translateX(-30px) scale(0.8);
        }
        to {
            opacity: 1;
            transform: translateX(0) scale(1);
        }
    }
    
    #my-hand-container .card-container {
        animation: slideInCard 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    }
    
    /* Kartlar için stagger efekti */
    #my-hand-container .card-container:nth-child(1) { animation-delay: 0s; }
    #my-hand-container .card-container:nth-child(2) { animation-delay: 0.03s; }
    #my-hand-container .card-container:nth-child(3) { animation-delay: 0.06s; }
    #my-hand-container .card-container:nth-child(4) { animation-delay: 0.09s; }
    #my-hand-container .card-container:nth-child(5) { animation-delay: 0.12s; }
    #my-hand-container .card-container:nth-child(6) { animation-delay: 0.15s; }
    #my-hand-container .card-container:nth-child(7) { animation-delay: 0.18s; }
    #my-hand-container .card-container:nth-child(8) { animation-delay: 0.21s; }
    #my-hand-container .card-container:nth-child(9) { animation-delay: 0.24s; }
    #my-hand-container .card-container:nth-child(10) { animation-delay: 0.27s; }
}


/* TABLET & PC UYUMLULUĞU (Media Queries) */
@media (min-width: 768px) {
    #opponents-strip { 
        justify-content: center; 
        min-height: 140px;
        padding: 20px;
        gap: 20px;
    }
    
    .opponent-chip { 
        transform: scale(1.1);
    }
    
    .opponent-chip.active-turn {
        transform: scale(1.2);
    }
    
    #game-table {
        padding: 40px;
    }
    
    #discard-pile { 
        width: 180px;
        height: 180px;
        transform: scale(1.4); 
        margin-bottom: 40px;
    }
    
    #status-text { 
        font-size: 2.2rem;
        margin-top: 30px;
    }
    
    #color-info {
        font-size: 1.3rem;
        padding: 10px 25px;
    }
    
    #action-area {
        min-height: 80px;
        gap: 20px;
        margin-top: 20px !important; /* Discard pile'dan sonra */
        margin-bottom: 140px !important; /* Kartlar için yer bırak */
    }
    
    #game-table {
        padding-bottom: 140px !important; /* Desktop'ta kartlar için yer */
    }
    
    .game-btn {
        padding: 16px 40px;
        font-size: 1.1rem;
        min-width: 160px;
    }
    
    .card-container { 
        width: 120px; 
        height: 192px; 
        margin-right: 0 !important; /* Tablet/PC'de overlap yok */
    }
    
    #my-hand-container { 
        min-height: 260px;
        height: auto;
        justify-content: center;
        gap: 12px; /* PC'de daha geniş boşluk */
        padding: 30px 20px;
    }
    
    .card-container:hover {
        transform: translateY(-50px) scale(1.1) !important;
    }
    
    /* Büyük kartlarda ellipse */
    #my-hand-container .card-container .ellipse {
        width: 94px;
        height: 154px;
    }
    
    /* Büyük kartlarda içerik ölçeklendirme */
    #my-hand-container .card-container .content {
        font-size: 76px;
    }
    #my-hand-container .card-container .small-content {
        font-size: 12px;
        top: 6px;
        left: 6px;
    }
    #my-hand-container .card-container .small-content-reverse {
        font-size: 12px;
        bottom: 6px;
        right: 6px;
    }
    #my-hand-container .card-container .skip-symbol {
        width: 60px;
        height: 60px;
        border-width: 12px;
        margin-top: -12px;
        margin-left: -12px;
    }
    #my-hand-container .card-container .skip-symbol::before {
        height: 12px;
    }
    #my-hand-container .card-container .small-content .skip-symbol,
    #my-hand-container .card-container .small-content-reverse .skip-symbol {
        width: 9.6px;
        height: 9.6px;
        border-width: 1.8px;
    }
    #my-hand-container .card-container .small-content .skip-symbol::before,
    #my-hand-container .card-container .small-content-reverse .skip-symbol::before {
        height: 1.8px;
    }
    #my-hand-container .card-container .plus-two-symbol {
        width: 60px;
        height: 78px;
    }
    #my-hand-container .card-container .plus-two-symbol::before,
    #my-hand-container .card-container .plus-two-symbol::after {
        width: 30px;
        height: 48px;
        border-width: 2.4px;
    }
    #my-hand-container .card-container .plus-two-symbol::before {
        transform: translateX(-65%);
    }
    #my-hand-container .card-container .plus-two-symbol::after {
        top: 24px;
        transform: translateX(-35%);
    }
    #my-hand-container .card-container .plus-two-text {
        font-size: 12px;
    }
    #my-hand-container .card-container .reverse-symbol {
        width: 60px;
        height: 60px;
    }
    #my-hand-container .card-container .arrow {
        width: 12px;
        height: 12px;
    }
    #my-hand-container .card-container .arrow::before {
        width: 12px;
        height: 12px;
        left: -10.8px;
    }
    #my-hand-container .card-container .arrow::after {
        border-width: 12px;
        right: -10.8px;
        top: -6px;
    }
    #my-hand-container .card-container .arrow:nth-child(1) {
        top: 6px;
        left: 30px;
    }
    #my-hand-container .card-container .arrow:nth-child(2) {
        bottom: 6px;
        left: 6px;
    }
    #my-hand-container .card-container .small-content .reverse-symbol,
    #my-hand-container .card-container .small-content-reverse .reverse-symbol {
        width: 14.4px;
        height: 14.4px;
    }
    #my-hand-container .card-container .small-content .arrow,
    #my-hand-container .card-container .small-content-reverse .arrow {
        width: 3.6px;
        height: 3.6px;
    }
    #my-hand-container .card-container .small-content .arrow::before,
    #my-hand-container .card-container .small-content-reverse .arrow::before {
        width: 3.6px;
        height: 3.6px;
        left: -3.24px;
    }
    #my-hand-container .card-container .small-content .arrow::after,
    #my-hand-container .card-container .small-content-reverse .arrow::after {
        border-width: 3.6px;
        right: -3.24px;
        top: -1.8px;
    }
    #my-hand-container .card-container .small-content .arrow:nth-child(1) {
        top: 1.8px;
        left: 7.2px;
    }
    #my-hand-container .card-container .small-content .arrow:nth-child(2) {
        bottom: 1.8px;
        left: 1.8px;
    }
    #my-hand-container .card-container .wild-symbol {
        width: 76.8px;
        height: 124.8px;
        border-width: 2.4px;
    }
    #my-hand-container .card-container .small-content .wild-symbol,
    #my-hand-container .card-container .small-content-reverse .wild-symbol {
        width: 11.52px;
        height: 18.72px;
        border-width: 0.6px;
    }
    #my-hand-container .card-container .plus-four-symbol {
        width: 76.8px;
        height: 124.8px;
    }
    #my-hand-container .card-container .mini-card {
        width: 24px;
        height: 38.4px;
        border-width: 3px;
    }
    #my-hand-container .card-container .mini-card.green {
        top: 50%;
        left: 3px;
    }
    #my-hand-container .card-container .mini-card.blue {
        top: 25%;
        left: 15px;
    }
    #my-hand-container .card-container .mini-card.red {
        top: 35%;
        left: 27px;
    }
    #my-hand-container .card-container .mini-card.yellow {
        top: 10%;
        left: 39px;
    }
    #my-hand-container .card-container .plus-four-text {
        font-size: 12px;
    }
}

/* Modal & Toast */
#color-modal { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.92); 
    backdrop-filter: blur(10px);
    z-index: 2000; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center;
    animation: fadeIn 0.3s ease;
}

#color-modal h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 2rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    color: white;
}

.color-choice { 
    width: 80px; 
    height: 80px; 
    border-radius: 50%; 
    margin: 10px; 
    border: 5px solid white; 
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.color-choice:hover {
    transform: scale(1.15);
    border-width: 6px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.7);
}

.color-choice:active {
    transform: scale(1.05);
}

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

@keyframes slideDown {
    from { 
        opacity: 0;
        transform: translateX(-50%) translateY(-30px);
    }
    to { 
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.toast { 
    position: fixed; 
    top: 150px; 
    left: 50%; 
    transform: translateX(-50%); 
    padding: 16px 32px; 
    background: #333; 
    color: white; 
    border-radius: 30px; 
    font-weight: bold; 
    font-size: 1.1rem;
    z-index: 9999; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.6); 
    border: 3px solid white;
    animation: slideDown 0.3s ease;
    text-align: center;
    max-width: 80%;
}

.toast-bad { 
    background: var(--red); 
    border-color: white;
}

.toast-uno { 
    background: var(--yellow); 
    color: black; 
    border-color: black;
    font-size: 1.3rem;
    box-shadow: 0 10px 30px rgba(255,223,0,0.5);
}

/* Mobil için toast boyutu */
@media (max-width: 767px) {
    .toast {
        top: 100px;
        font-size: 0.95rem;
        padding: 12px 24px;
        max-width: 88%;
        border-radius: 24px;
    }
    
    .toast-uno {
        font-size: 1.1rem;
        padding: 14px 28px;
    }
    
    .toast-bad {
        animation: shake 0.5s ease;
    }
    
    @keyframes shake {
        0%, 100% { transform: translateX(-50%) translateY(0); }
        25% { transform: translateX(-50%) translateY(-5px) rotate(-2deg); }
        75% { transform: translateX(-50%) translateY(-5px) rotate(2deg); }
    }
    
    .color-choice {
        width: 70px;
        height: 70px;
        margin: 8px;
    }
    
    #color-modal h2 {
        font-size: 1.6rem;
        margin-bottom: 25px;
    }
    
    /* Mobil Header Butonları */
    #game-header {
        padding: 8px 10px !important;
        background: rgba(0,0,0,0.3) !important;
        height: 54px !important;
    }
    
    #game-log-toggle,
    #sound-toggle,
    #fullscreen-toggle {
        width: 38px !important;
        height: 38px !important;
        font-size: 1.15rem !important;
    }
    
    #fullscreen-toggle {
        font-size: 1.25rem !important;
    }
    
    /* Mobil için opponents strip ayarı */
    #opponents-strip {
        margin-top: 54px !important;
        min-height: 65px !important;
        max-height: 65px !important;
        padding: 6px 8px !important;
    }
    
    /* Mobil Oyun Geçmişi Paneli */
    #game-log-panel {
        top: 65px !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-height: 45vh !important;
    }
    
    #game-log-content {
        max-height: calc(45vh - 50px) !important;
    }
    
    .log-item {
        padding: 8px 10px;
        font-size: 0.85rem;
        flex-wrap: wrap;
    }
    
    .log-player {
        min-width: 60px;
        font-size: 0.85rem;
    }
    
    /* Mobil Hızlı Mesajlar - Üstte sağda yatay */
    #quick-messages {
        top: 65px !important;
        right: 10px !important;
        gap: 4px;
        padding: 5px;
    }
    
    .quick-msg-btn {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }
    
    /* Mobil Mesaj Bildirimleri */
    #message-container {
        top: 120px !important;
        right: 10px !important;
        left: auto !important;
        width: calc(100% - 20px) !important;
        max-width: 300px !important;
    }
    
    .player-message {
        font-size: 0.85rem;
        padding: 8px 14px;
        margin-bottom: 6px;
    }
    
    /* Mobil durum metni */
    #status-text {
        font-size: 1.1rem !important;
        margin-top: 12px !important;
        padding: 8px 15px !important;
    }
    
    #color-info {
        font-size: 0.95rem !important;
        margin-top: 6px !important;
        padding: 6px 12px !important;
    }
}

/* ============================================
   YENİ ÖZELLİKLER - MODAL, ANİMASYONLAR, vs.
   ============================================ */

/* Modal Genel Stilleri */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.hidden {
    display: none;
}

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

.modal-content {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 20px;
    padding: 25px;
    max-width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 15px;
}

.modal-header h2 {
    margin: 0;
    color: var(--yellow);
    font-size: 1.8rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 0, 0, 0.3);
    transform: scale(1.1);
}

.modal-body {
    color: white;
    line-height: 1.6;
}

.rules-section {
    margin-bottom: 25px;
}

.rules-section h3 {
    color: var(--yellow);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.rules-section ul {
    list-style: none;
    padding-left: 0;
}

.rules-section li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.rules-section li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--yellow);
}

/* Oyun Sonu Modal */
.game-over-content {
    text-align: center;
    max-width: 500px;
}

.game-over-header h1 {
    font-size: 3rem;
    margin: 0;
    color: var(--yellow);
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.game-over-header p {
    font-size: 1.5rem;
    margin: 10px 0 20px;
    color: white;
}

.game-over-stats {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    color: rgba(255, 255, 255, 0.8);
}

.stat-value {
    color: var(--yellow);
    font-weight: bold;
}

.game-over-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

/* Reconnect Overlay */
#reconnect-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.reconnect-box {
    text-align: center;
    color: white;
    padding: 30px;
    background: rgba(30, 60, 114, 0.9);
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.reconnect-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--yellow);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.reconnect-box h3 {
    margin: 0 0 10px;
    color: var(--yellow);
}

.reconnect-box p {
    margin: 0 0 20px;
    opacity: 0.8;
}

/* Yardım Butonu */
.btn-help {
    margin-top: 15px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-help:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}


/* Tooltip */
[title] {
    position: relative;
}

/* Mobil Optimizasyonlar */
@media (max-width: 767px) {
    .modal-content {
        max-width: 95%;
        padding: 20px;
        max-height: 90vh;
    }
    
    .modal-header h2 {
        font-size: 1.4rem;
    }
    
    .game-over-header h1 {
        font-size: 2rem;
    }
    
    .game-over-actions {
        flex-direction: column;
    }
    
    .game-over-actions button {
        width: 100%;
    }
    
    .rules-section h3 {
        font-size: 1.1rem;
    }
    
    .rules-section li {
        font-size: 0.9rem;
        padding-left: 20px;
    }
    
    #rules-toggle,
    #settings-toggle {
        width: 38px !important;
        height: 38px !important;
        font-size: 1.15rem !important;
    }
}

/* ============================================
   YENİ ÖZELLİKLER - TEMA, AVATAR, AYARLAR
   ============================================ */

/* Avatar Seçici */
.avatar-selector {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.avatar-option {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.avatar-option:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}

.avatar-option.selected {
    border-color: var(--yellow);
    background: rgba(255, 223, 0, 0.2);
    box-shadow: 0 0 15px rgba(255, 223, 0, 0.5);
}

/* Tema Seçici */
.theme-selector {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.theme-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.theme-option.selected {
    background: rgba(255, 223, 0, 0.2);
    border: 2px solid var(--yellow);
}

.theme-preview {
    width: 80px;
    height: 50px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.default-theme {
    background: linear-gradient(-45deg, #1e3c72, #2a5298, #2ecc71, #2c3e50);
}

.dark-theme {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d, #1a1a1a);
}

.colorful-theme {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #ffe66d, #ff6b9d);
}

/* Font Boyutu Kontrolü */
.font-size-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.btn-small {
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.btn-small:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

#font-size-display {
    min-width: 80px;
    text-align: center;
    font-weight: bold;
}

/* Switch (Toggle) */
.switch {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 15px 0;
    cursor: pointer;
}

.switch input[type="checkbox"] {
    display: none;
}

.slider {
    position: relative;
    width: 50px;
    height: 26px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 26px;
    transition: all 0.3s ease;
}

.slider::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    top: 3px;
    left: 3px;
    transition: all 0.3s ease;
}

.switch input[type="checkbox"]:checked + .slider {
    background: var(--green);
}

.switch input[type="checkbox"]:checked + .slider::before {
    transform: translateX(24px);
}

.switch-label {
    color: white;
    user-select: none;
}

.settings-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section h3 {
    color: var(--yellow);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

/* Klavye Kısayolları Bilgi - Sadece desktop'ta göster */
#keyboard-shortcuts-info {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    display: block;
}

.shortcuts-box {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    max-width: 250px;
}

.shortcuts-box h3 {
    color: var(--yellow);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    color: white;
    font-size: 0.9rem;
}

kbd {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Tema Değişkenleri */
body.theme-dark {
    --bg-gradient: linear-gradient(135deg, #1a1a1a, #2d2d2d, #1a1a1a);
}

body.theme-colorful {
    --bg-gradient: linear-gradient(45deg, #ff6b6b, #4ecdc4, #ffe66d, #ff6b9d);
}

/* Yüksek Kontrast Modu */
body.high-contrast {
    --red: #FF0000;
    --blue: #0000FF;
    --green: #00FF00;
    --yellow: #FFFF00;
    --black: #000000;
    filter: contrast(1.3);
}

body.high-contrast .card {
    border: 3px solid #000;
}

/* Font Boyutu Değişkenleri */
body.font-small {
    font-size: 14px;
}

body.font-medium {
    font-size: 16px;
}

body.font-large {
    font-size: 18px;
}

body.font-xlarge {
    font-size: 20px;
}

/* Mobil Ayarlar */
@media (max-width: 767px) {
    .avatar-selector {
        gap: 10px;
    }
    
    .avatar-option {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .theme-selector {
        gap: 10px;
    }
    
    .theme-preview {
        width: 60px;
        height: 40px;
    }
    
    /* Klavye kısayolları mobilde gizle */
    #keyboard-shortcuts-info {
        display: none !important;
    }
}