@import 'fonts.css';

:root {
    /* Luxury Palette */
    --bg-dark: #0f1012;
    /* En koyu antrasit (Background) */
    --bg-card: #1a1c20;
    /* Kart zemin rengi */
    --bg-input: #23262b;
    /* Input zemin rengi */

    --gold-primary: #d4af37;
    /* Metalik Altın */
    --gold-light: #f3e5ab;
    /* Açık Altın (Hover/Highlight) */
    --gold-dark: #aa8c2c;
    /* Koyu Altın (Border/Active) */

    --text-main: #e0e0e0;
    /* Ana metin rengi (Kırık beyaz) */
    --text-muted: #888888;
    /* İkincil metin */

    --border-color: rgba(212, 175, 55, 0.2);
    /* İnce altın çizgi */

    --danger: #ff4d4d;
    --success: #00b894;

    /* Spacing & Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    --radius-lg: 12px;

    --font-heading: 'Playfair Display', serif;

    --btn-text: #000000;
    /* Varsayılan (Gold tema için) siyah yazı */
}

/* THEME: White (Light Mode) */
body.theme-white {
    --bg-dark: #ffffff;
    --bg-card: #f5f5f7;
    --bg-input: #e1e1e3;

    --text-main: #1d1d1f;
    --text-muted: #555555;

    --border-color: rgba(0, 0, 0, 0.1);

    /* "Beyaz açık modda gold detayları siyah yap" */
    --gold-primary: #000000;
    --gold-light: #333333;
    --gold-dark: #000000;

    --font-heading: 'Montserrat', sans-serif;

    --btn-text: #ffffff;
    /* White text for black buttons in white theme */
}

/* THEME: Turquoise */
body.theme-turquoise {
    --bg-dark: #12181b;
    --bg-card: #1c2529;
    --bg-input: #263036;

    --text-main: #ffffff;
    --text-muted: #b2bec3;

    /* "Gold detayları ... beyaz" */
    --gold-primary: #ffffff;
    --gold-light: #f0f0f0;
    --gold-dark: #e0e0e0;

    --border-color: rgba(255, 255, 255, 0.15);

    --font-heading: 'Montserrat', sans-serif;
}

/* THEME: Navy (Lacivert) */
body.theme-navy {
    --bg-dark: #0a192f;
    --bg-card: #112240;
    --bg-input: #233554;

    --text-main: #ffffff;
    --text-muted: #8892b0;

    /* "Gold detayları ... beyaz" */
    --gold-primary: #ffffff;
    --gold-light: #e6f1ff;
    --gold-dark: #ccd6e0;

    --border-color: rgba(255, 255, 255, 0.15);

    --font-heading: 'Montserrat', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-dark);
    /* Subtle texture or gradient */
    background-image: radial-gradient(circle at top right, #1f2126 0%, transparent 40%),
        radial-gradient(circle at bottom left, #1f2126 0%, transparent 40%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6,
.brand-title {
    font-family: var(--font-heading);
    color: var(--gold-primary);
    margin-top: 0;
}

a {
    color: var(--gold-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--gold-light);
}

/* Containers */
.container {
    padding: 40px 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Login/Register için */
}

/* Cards & Panels */
.panel,
.terminal,
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

/* Top accent line for cards */
.panel::before,
.terminal::before,
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

/* Forms */
.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 2px solid transparent;
    border-radius: var(--radius-sm);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    background: #2a2d33;
    border-bottom-color: var(--gold-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: var(--btn-text, #000) !important;
    /* Contrast text */
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
    background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
}

.btn-secondary:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-light);
}

.btn-danger {
    background: rgba(255, 77, 77, 0.1);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
}

/* Alerts */
.alert {
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-size: 14px;
    border-left: 4px solid;
}

.alert-error {
    background: rgba(255, 77, 77, 0.1);
    border-color: var(--danger);
    color: #ffcccc;
}

.alert-success {
    background: rgba(0, 184, 148, 0.1);
    border-color: var(--success);
    color: #ccffe6;
}

/* Login/Register Specific Layouts */
.terminal-wrapper {
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

.brand-section {
    text-align: center;
    margin-bottom: 40px;
}

.brand-logo-img {
    height: 80px;
    width: auto;
    object-fit: contain;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.3));
}

.brand-title {
    font-size: 24px;
    letter-spacing: 1px;
}

/* Utils */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.d-flex {
    display: flex;
}

.gap-2 {
    gap: 0.5rem;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.small {
    font-size: 12px;
}

.muted {
    color: var(--text-muted);
}

/* Password Toggle */
.pw-wrap {
    position: relative;
}

.pw-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gold-primary);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    opacity: 0.7;
}

.pw-toggle:hover {
    opacity: 1;
}

/* Admin System Tables */
table.dataTable {
    border-collapse: collapse !important;
    width: 100% !important;
    color: var(--text-main) !important;
}

table.dataTable thead th {
    background-color: var(--bg-input) !important;
    color: var(--gold-primary) !important;
    border-bottom: 1px solid var(--gold-dark) !important;
    font-family: var(--font-heading);
    font-weight: 400;
    padding: 16px !important;
}

table.dataTable tbody td {
    background-color: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 14px !important;
}

table.dataTable tbody tr {
    background-color: transparent !important;
    transition: background 0.2s;
}

table.dataTable tbody tr:hover {
    background-color: rgba(212, 175, 55, 0.05) !important;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
    color: var(--text-muted) !important;
    margin-top: 10px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: var(--gold-primary) !important;
    border: 1px solid transparent !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--gold-primary) !important;
    color: #000 !important;
    border: 1px solid var(--gold-primary) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(212, 175, 55, 0.1) !important;
    color: var(--gold-primary) !important;
    border: 1px solid var(--gold-primary) !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-dark);
}

/* iOS CNA Fallback — Connect Button */
.btn-connect {
    position: relative;
    font-size: 16px;
    letter-spacing: 2px;
    padding: 16px 28px;
    animation: btn-pulse 2s ease-in-out infinite;
}

@keyframes btn-pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
    }
    50% {
        box-shadow: 0 4px 30px rgba(212, 175, 55, 0.5), 0 0 60px rgba(212, 175, 55, 0.15);
    }
}

/* SVG Icon Helper */
.icon-svg {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    fill: currentColor;
}

/* Responsive Design Tweaks */
@media (max-width: 480px) {
    .container {
        padding: 10px;
        /* Daha az padding (mobil) */
        justify-content: flex-start;
        /* Üstten başlasın, klavye açılınca sıkışmasın */
        padding-top: 20px;
    }

    .panel,
    .terminal,
    .card {
        padding: 20px 15px;
        /* İç boşluğu küçült */
        border-radius: var(--radius-md);
    }

    .brand-section {
        margin-bottom: 20px;
    }

    .brand-logo-img {
        height: 60px;
        /* Logo biraz küçülsün */
    }

    .brand-title {
        font-size: 20px;
    }

    h1 {
        font-size: 22px;
    }

    /* Input font-size: 16px to prevent iOS auto-zoom */
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px !important;
        padding: 12px;
    }

    .btn {
        width: 100%;
        padding: 12px;
    }

    /* Footer linklerin arasını açalım */
    .text-center.muted.small div {
        margin-bottom: 5px;
        font-size: 12px;
    }
}