/* --- Değişkenler ve Genel Ayarlar --- */
:root {
    --bg-color: #f4f7f9;
    --panel-bg: #ffffff;
    --primary-color: #3672FF;
    --primary-hover: #2654D0;
    --secondary-color: #6c757d;
    --secondary-hover: #5a6268;
    --text-color: #343a40;
    --border-color: #e9ecef;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --border-radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.app-container {
    display: grid;
    grid-template-columns: 350px 1fr 300px;
    gap: 20px;
    padding: 20px;
    height: 100vh;
}

.panel {
    background-color: var(--panel-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 25px;
    display: flex;
    flex-direction: column;
}

/* --- Sol Panel: Kontroller --- */
.controls-panel { gap: 25px; }
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}
.panel-header h1 { font-size: 1.5rem; }

.language-switcher .lang-option {
    cursor: pointer; padding: 5px 8px; border-radius: 8px; font-weight: 600;
    transition: all 0.2s; margin-left: 5px;
}
.language-switcher .lang-option.active { background-color: var(--primary-color); color: white; }
.language-switcher .lang-option:not(.active):hover { background-color: var(--border-color); }

.control-section h2 { font-size: 1.1rem; margin-bottom: 15px; }

.input-group { display: flex; gap: 10px; }
#option-input, select {
    flex-grow: 1; padding: 12px; border: 1px solid var(--border-color);
    border-radius: 8px; font-size: 1rem; transition: border-color 0.2s, box-shadow 0.2s;
}
#option-input:focus, select:focus {
    outline: none; border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(54, 114, 255, 0.2);
}

.button-primary, .button-secondary, .icon-button {
    padding: 12px 20px; border: none; border-radius: 8px; cursor: pointer;
    font-weight: 600; transition: all 0.2s; font-family: 'Poppins', sans-serif;
}
.button-primary { background-color: var(--primary-color); color: white; }
.button-primary:hover { background-color: var(--primary-hover); }
.button-secondary { background-color: var(--border-color); color: var(--text-color); display: flex; align-items: center; gap: 8px; justify-content: center; }
.button-secondary:hover { background-color: #d8dde0; }
.icon-button { padding: 12px; background-color: var(--border-color); }
.icon-button:hover { background-color: #d8dde0; }

.options-list { display: flex; flex-direction: column; gap: 8px; margin-top: 15px; max-height: 200px; overflow-y: auto; padding-right: 5px; }
.option-tag {
    background-color: var(--bg-color); padding: 8px 12px; border-radius: 8px;
    display: flex; justify-content: space-between; align-items: center; cursor: pointer;
    word-break: break-all;
}
.option-tag .remove-option { cursor: pointer; font-weight: bold; color: #aaa; margin-left: 8px; }
.option-tag .edit-input { width: 100%; border: none; background-color: white; padding: 2px 5px; border-radius: 4px; }

.panel-footer { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--border-color); }
.google-btn { width: 100%; background: #fff; border: 1px solid var(--border-color);
  color: #777; display: flex; align-items: center; justify-content: center; gap: 10px; }
.google-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.google-btn img { width: 18px; height: 18px; }

/* --- Orta Panel: Çark --- */
.wheel-panel { align-items: center; justify-content: center; gap: 20px; }
.wheel-wrapper { position: relative; display: flex; align-items: center; justify-content: center; }
.pointer {
    width: 0; height: 0; border-left: 20px solid transparent; border-right: 20px solid transparent;
    border-top: 40px solid #e74c3c; position: absolute; top: -20px; z-index: 10;
    filter: drop-shadow(0 -2px 2px rgba(0,0,0,0.2));
}
#wheel-canvas { transition: transform 7s cubic-bezier(0.1, 0.7, 0.3, 1); }
#spin-button {
    position: absolute; width: 100px; height: 100px; border-radius: 50%;
    font-size: 1.5rem; font-weight: 700; text-transform: uppercase;
    background-color: white; border: 8px solid var(--panel-bg);
    box-shadow: 0 0 15px rgba(0,0,0,0.15);
}
#spin-button:disabled { opacity: 0.7; cursor: not-allowed; }
.last-winner { text-align: center; font-size: 1.2rem; margin-top: 20px; }
#last-winner-text { font-weight: 600; color: var(--primary-color); }

/* --- Sağ Panel: Ayarlar --- */
.settings-panel { gap: 20px; }
.settings-panel h2 { border-bottom: 1px solid var(--border-color); padding-bottom: 15px; }
.setting-item { display: flex; justify-content: space-between; align-items: center; }

/* Switch (Toggle) stilleri */
.switch { position: relative; display: inline-block; width: 50px; height: 28px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc; transition: .4s; }
.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 4px;
    bottom: 4px; background-color: white; transition: .4s; }
input:checked + .slider { background-color: var(--primary-color); }
input:checked + .slider:before { transform: translateX(22px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }
.feedback-message { opacity: 0; transition: opacity 0.5s; color: green; text-align: center; margin-top: 10px;}

/* --- Modal ve Bilgi Butonu --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6);
    display: flex; align-items: center; justify-content: center; z-index: 1000;
    opacity: 0; visibility: hidden; transition: all 0.3s;
}
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal-content {
    background: white; padding: 40px 50px; border-radius: var(--border-radius); text-align: center;
    position: relative; transform: translateY(-20px); transition: all 0.3s; max-width: 500px;
}
.modal-overlay.show .modal-content { transform: translateY(0); }
.modal-content p { font-size: 1rem; color: #666; }
.modal-content h2 { font-size: 1.8rem; color: var(--primary-color); margin-top: 10px; }
.close-button { position: absolute; top: 15px; right: 20px; font-size: 2rem;
    color: #aaa; cursor: pointer; line-height: 1; }

#about-modal .modal-content { text-align: left; }
#about-modal .modal-content h2{ text-align: center; margin-bottom: 15px; margin-top: 0;}
#about-modal .modal-content p{ margin-bottom: 10px; }


#info-button {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 999;
}
#info-button:hover {
    transform: scale(1.1);
    background-color: var(--primary-hover);
}
#info-button .material-symbols-outlined {
    font-size: 32px;
}

/* --- Mobil Uyumluluk --- */
@media (max-width: 1200px) {
    .app-container { grid-template-columns: 320px 1fr; grid-template-rows: auto auto; height: auto; }
    .settings-panel { grid-row: 2; grid-column: 1 / 3; }
}
@media (max-width: 768px) {
    body { padding: 0; }
    .app-container { display: flex; flex-direction: column; height: auto; gap: 0; }
    .panel { border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--border-color); }
    .wheel-panel { order: -1; }
    #wheel-canvas { width: 320px; height: 320px; }
    .pointer { border-left-width: 15px; border-right-width: 15px; border-top-width: 30px; top: -15px;}
    #spin-button { width: 80px; height: 80px; font-size: 1.2rem; border-width: 6px; }
    #info-button {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    #info-button .material-symbols-outlined {
        font-size: 28px;
    }
}