/*
 * OZDUO Hesaplama Araçları
 * Gelişmiş CSS Tasarım Sistemi (Vanilla CSS)
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #1a365d;
    --primary-light: #2b6cb0;
    --primary-dark: #0f172a;
    --accent: #d97706;
    --accent-light: #f59e0b;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    
    --success: #16a34a;
    --success-bg: #dcfce7;
    --warning: #ca8a04;
    --warning-bg: #fef9c3;
    --danger: #dc2626;
    --danger-bg: #fee2e2;
    
    --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

body.dark-mode {
    --bg-main: #0b0f19;
    --bg-card: #151f32;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #1e293b;
    
    --success-bg: rgba(22, 163, 74, 0.15);
    --warning-bg: rgba(202, 138, 4, 0.15);
    --danger-bg: rgba(220, 38, 38, 0.15);
    
    --shadow-sm: 0 1px 3px 0 rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.5);
}

/* Base resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
}

/* Header & Navbar */
.navbar {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s, border-color 0.3s;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-main);
}

.brand-logo {
    font-weight: 800;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.brand-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    border-left: 2px solid var(--border);
    padding-left: 0.75rem;
    display: none;
}

@media (min-width: 640px) {
    .brand-subtitle {
        display: inline-block;
    }
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle-btn, .nav-home-btn {
    background: var(--bg-main);
    border: 1px solid var(--border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle-btn:hover, .nav-home-btn:hover {
    background-color: var(--border);
    transform: scale(1.05);
}

.nav-home-btn {
    border-radius: var(--radius-sm);
    width: auto;
    padding: 0 1rem;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    gap: 0.5rem;
}

/* Container */
.container {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Dashboard Selection Page */
.dashboard-header {
    text-align: center;
    margin-bottom: 3rem;
}

.dashboard-header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.dashboard-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.tools-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.tool-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-decoration: none;
    color: var(--text-main);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-light), var(--accent));
    opacity: 0;
    transition: var(--transition);
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(99, 102, 241, 0.2);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    background-color: rgba(43, 108, 176, 0.1);
    color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.tool-card:hover .tool-icon-wrapper {
    background-color: var(--primary-light);
    color: #ffffff;
    transform: scale(1.1);
}

.tool-icon {
    width: 32px;
    height: 32px;
}

.tool-card h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tool-card .tool-subtitle {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tool-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.tool-card-footer {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary-light);
    gap: 0.5rem;
    transition: var(--transition);
}

.tool-card:hover .tool-card-footer {
    color: var(--accent);
    gap: 0.75rem;
}

/* Calculator View Layout */
.calculator-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 992px) {
    .calculator-wrapper {
        grid-template-columns: 1.2fr 1fr;
    }
    
    .calculator-wrapper.wide-layout {
        grid-template-columns: 1fr;
    }
}

.calculator-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    box-shadow: var(--shadow-lg);
    height: fit-content;
}

.calculator-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
    margin-bottom: 1.75rem;
}

.calculator-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-light);
    letter-spacing: -0.3px;
    line-height: 1.3;
}

.calculator-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.4rem;
    font-weight: 500;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.input-group input, .input-group select {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--bg-main);
    color: var(--text-main);
    font-size: 1rem;
    font-family: inherit;
    font-weight: 500;
    transition: var(--transition);
}

.input-group input:focus, .input-group select:focus {
    outline: none;
    border-color: var(--primary-light);
    background-color: var(--bg-card);
    box-shadow: 0 0 0 4px rgba(43, 108, 176, 0.15);
}

.input-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234a5568'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
    cursor: pointer;
}

body.dark-mode .input-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
}

.formula-box {
    background: linear-gradient(135deg, rgba(43, 108, 176, 0.05), rgba(217, 119, 6, 0.05));
    border: 1px dashed var(--border);
    padding: 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 500;
}

/* Results Section */
.results-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: fit-content;
}

.results-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.result-item {
    background-color: var(--bg-main);
    border: 1px solid var(--border);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.result-item.highlight-blue {
    background-color: rgba(43, 108, 176, 0.07);
    border-color: rgba(43, 108, 176, 0.2);
}

.result-item.highlight-green {
    background-color: var(--success-bg);
    border-color: rgba(22, 163, 74, 0.25);
}

.result-item.highlight-red {
    background-color: var(--danger-bg);
    border-color: rgba(220, 38, 38, 0.25);
}

.result-item.highlight-orange {
    background-color: var(--warning-bg);
    border-color: rgba(202, 138, 4, 0.25);
}

.result-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.result-value {
    font-size: 1.25rem;
    font-weight: 800;
}

.result-item.highlight-blue .result-value {
    color: var(--primary-light);
}

.result-item.highlight-green .result-value {
    color: var(--success);
}

.result-item.highlight-red .result-value {
    color: var(--danger);
}

.result-item.highlight-orange .result-value {
    color: var(--warning);
}

/* Large Gauge Result Display */
.gauge-display {
    text-align: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.gauge-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.gauge-value {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge-message {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

/* Rules / Instructions Info Box */
.rules-box {
    background-color: var(--warning-bg);
    border: 1px solid rgba(202, 138, 4, 0.2);
    border-left: 4px solid var(--accent);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    margin-top: 1.5rem;
}

.rules-box h4 {
    font-size: 0.95rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rules-box ul {
    list-style-type: none;
    font-size: 0.85rem;
    line-height: 1.6;
}

.rules-box ul li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.25rem;
}

.rules-box ul li::before {
    content: "•";
    color: var(--accent);
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    line-height: 1;
}

/* Interactive Schedule Table */
.schedule-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    background-color: var(--bg-card);
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.schedule-table th, .schedule-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.schedule-table th {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.schedule-table tr:last-child td {
    border-bottom: none;
}

.schedule-table tbody tr:hover {
    background-color: rgba(43, 108, 176, 0.02);
}

/* Buttons */
.btn {
    width: 100%;
    padding: 0.9rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(43, 108, 176, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(43, 108, 176, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Footer & Legal */
.footer {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 2rem 1.5rem;
    margin-top: auto;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.disclaimer-text {
    text-align: justify;
    line-height: 1.6;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border);
}

/* Helper Utilities */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

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