/* style.css */
:root {
    --dark-bg: #121212;
    --card-bg: #1e1e1e;
    --neon-blue: #00ffff;
    --text-color: #e0e0e0;
    --glow-shadow: 0 0 8px rgba(0, 255, 255, 0.6);
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-color);
    line-height: 1.6;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Başlık (Header) ve Navigasyon --- */
header {
    background-color: var(--card-bg);
    box-shadow: var(--glow-shadow);
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    flex-wrap: wrap; 
}

/* LOGO KÜÇÜLTME */
.logo a {
    font-family: monospace;
    font-size: 1.8em; 
    color: var(--neon-blue);
    text-decoration: none;
    text-shadow: 0 0 5px var(--neon-blue), 0 0 10px var(--neon-blue);
    transition: color 0.3s;
}

/* Navigasyon Düzeni */
nav.auth-buttons {
    display: flex;
    align-items: center;
    gap: 15px; 
}

/* İçteki divleri (logged-in/out) de esnek hale getir */
#logged-out-nav, #logged-in-nav {
    display: flex;
    align-items: center;
    gap: 10px; 
}

nav.auth-buttons a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px; 
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s, text-shadow 0.3s;
    font-size: 0.95em;
}

nav.auth-buttons a:hover {
    color: var(--neon-blue);
    text-shadow: 0 0 3px var(--neon-blue);
}

/* KAYIT OL/GİRİŞ YAP BUTON OPTİMİZASYONU */
.auth-buttons a {
    background-color: transparent;
    border: 1px solid var(--neon-blue);
    padding: 6px 12px; 
}

.auth-buttons a:hover {
    background-color: rgba(0, 255, 255, 0.1);
}

/* Logout butonunun stilleri */
#logout-btn {
    background: none; 
    border: none; 
    color: var(--text-color); 
    cursor: pointer; 
    font-size: 1em; 
    margin-left: 15px;
}

/* --- DUYURU VE REKLAM ALANI STILLERİ (TAŞMA DÜZELTİLDİ) --- */

#announcement-bar {
    background-color: #00ffff22; 
    color: var(--text-color);
    padding: 10px 0;
    text-align: center;
    border-bottom: 2px solid var(--neon-blue);
    box-shadow: var(--glow-shadow);
    margin-bottom: 20px; 
    overflow-x: hidden; 
}

#announcement-bar .container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 15px; 
    box-sizing: border-box;
}

#announcement-text {
    margin: 0;
    font-size: 1.1em;
    font-weight: 500;
    word-wrap: break-word; 
    overflow-wrap: break-word; 
}

#announcement-text strong {
    color: var(--neon-blue);
    text-shadow: 0 0 3px var(--neon-blue);
}


/* --- Ana İçerik ve Konteyner --- */
main {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 1000px;
    width: 100%;
    margin: auto;
    padding: 0 15px; 
    box-sizing: border-box;
}

/* --- Form Stilleri (Ortak) --- */
.card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    margin-bottom: 25px;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

h2 {
    color: var(--neon-blue);
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 2px var(--neon-blue);
}

input[type="email"],
input[type="password"],
input[type="text"],
textarea {
    width: calc(100% - 24px);
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid rgba(0, 255, 255, 0.5);
    background-color: #2b2b2b;
    color: var(--text-color);
    border-radius: 5px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

input:focus,
textarea:focus {
    border-color: var(--neon-blue);
    outline: none;
    box-shadow: var(--glow-shadow);
}

/* --- Butonlar --- */
button {
    width: 100%;
    padding: 12px;
    background-color: var(--neon-blue);
    color: var(--dark-bg);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

button:hover {
    background-color: #00e5e5;
    transform: translateY(-1px);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

/* --- Konu Listesi --- */
#topics-list {
    list-style-type: none;
    padding: 0;
}

.topic-item {
    background: #2b2b2b;
    padding: 15px 20px;
    margin-bottom: 12px;
    border-left: 5px solid var(--neon-blue);
    border-radius: 5px;
    transition: background-color 0.3s;
}

.topic-item:hover {
    background-color: #383838;
}

.topic-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
    font-size: 1.2em;
    display: block;
    margin-bottom: 5px;
}

.topic-info {
    font-size: 0.9em;
    color: #aaa;
}

.topic-info span {
    color: var(--neon-blue);
}

/* --- METİN BÜTÜNLÜĞÜ DÜZELTMELERİ (ALT SATIRA GEÇME SORUNU) --- */

/* Konu içeriği ve mesaj içeriğindeki alt satır boşluklarını koru */
#topic-content, 
.message-item p {
    white-space: pre-wrap; 
    /* Metnin Enter ile bırakılan boşlukları ve alt satırları korumasını sağlar */
}

/* --- MOBİL UYUMLULUK --- */
@media (max-width: 600px) {
    header {
        flex-direction: column;
        padding: 15px;
        gap: 10px;
    }
    
    .logo a {
        font-size: 1.4em; 
    }

    nav.auth-buttons {
        width: 100%; 
        justify-content: center;
        gap: 10px;
    }

    #logged-out-nav, #logged-in-nav {
        gap: 5px;
    }

    .auth-buttons a {
        padding: 4px 8px;
        font-size: 0.85em;
    }
    
    #announcement-bar {
        padding: 8px 0;
    }

    #announcement-text {
        font-size: 0.9em; 
    }
}
