/* ============================================
   Ek Ders Hesaplama 2026 - Ana Stil Dosyası
   ============================================ */

/* CSS Custom Properties */
:root {
    /* Colors - Turkish Flag Inspired */
    --color-primary: #E30A17;
    --color-primary-dark: #B30813;
    --color-primary-light: rgba(227, 10, 23, 0.1);
    --color-white: #FFFFFF;
    --color-bg: #FFFFFF;
    --color-bg-alt: #F5F5F5;
    --color-bg-card: #FFFFFF;
    --color-text: #1F2937;
    --color-text-secondary: #6B7280;
    --color-text-muted: #9CA3AF;
    --color-border: #E5E7EB;
    --color-border-focus: #E30A17;
    --color-success: #10B981;
    --color-info: #3B82F6;
    --color-warning: #F59E0B;
    --color-danger: #EF4444;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: "SF Mono", Monaco, Inconsolata, "Fira Code", monospace;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 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.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);

    /* Layout */
    --container-max: 1200px;
    --header-height: 64px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Reset & Base
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--color-info);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul,
ol {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-text);
    font-weight: 700;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

/* ============================================
   Layout
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.flex-1 {
    flex: 1;
}

/* ============================================
   Header
   ============================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition-base);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-text);
    font-size: 1.125rem;
    font-weight: 500;
    text-decoration: none;
}

.logo strong {
    font-weight: 700;
    color: var(--color-primary);
}

.logo-icon {
    flex-shrink: 0;
}

.nav-desktop {
    display: flex;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.nav-link {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
    background: var(--color-primary-light);
}

/* Dropdown Navigation */
.nav-dropdown {
    position: relative;
}

.nav-dropdown>.nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-dropdown>.nav-link svg {
    transition: transform var(--transition-fast);
}

.nav-dropdown:hover>.nav-link svg {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 240px;
    padding: var(--space-xs) 0;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: 100;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.dropdown-menu li a:hover {
    color: var(--color-primary);
    background: var(--color-primary-light);
    border-left-color: var(--color-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Dark Mode Toggle */
/* Dark Mode Toggle & History Button */
.dark-mode-toggle,
.history-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.dark-mode-toggle:hover,
.history-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.icon-moon {
    display: none;
}

[data-theme="dark"] .icon-sun {
    display: none;
}

[data-theme="dark"] .icon-moon {
    display: block;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 8px;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav */
.nav-mobile {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    padding: var(--space-md);
}

.nav-mobile.open {
    display: block;
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.mobile-nav-link {
    display: block;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-weight: 500;
    transition: background var(--transition-fast);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.mobile-nav-divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: var(--space-sm) 0;
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    padding: var(--space-3xl) 0;
    background: linear-gradient(135deg, #FFF5F5 0%, #FFFFFF 50%, #FFF0F0 100%);
    overflow: hidden;
    position: relative;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-md);
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.5);
    }
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: var(--space-lg);
}

.text-gradient {
    background: linear-gradient(135deg, #E30A17, #B30813);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-xl);
    max-width: 520px;
}

.hero-stats {
    display: flex;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.stat-item {
    text-align: left;
}

.stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-primary);
    font-family: var(--font-mono);
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

/* Hero Illustration */
.hero-illustration {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-graphic {
    position: relative;
    width: 400px;
    height: 400px;
}

.hero-circle {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(227, 10, 23, 0.08), rgba(227, 10, 23, 0.02));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hero-circle-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(227, 10, 23, 0.12), rgba(227, 10, 23, 0.04));
}

.floating-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 2;
    animation: float 6s ease-in-out infinite;
}

.card-1 {
    top: 20%;
    left: 5%;
    animation-delay: 0s;
}

.card-2 {
    top: 50%;
    right: 5%;
    animation-delay: 2s;
}

.card-3 {
    bottom: 15%;
    left: 15%;
    animation-delay: 4s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-12px);
    }
}

/* ============================================
   Calculator Section
   ============================================ */
.calculator-section {
    padding: var(--space-3xl) 0;
    background: var(--color-bg-alt);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-title {
    margin-bottom: var(--space-sm);
}

.section-desc {
    color: var(--color-text-secondary);
    font-size: 1.0625rem;
}

.calculator-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: var(--space-xl);
    align-items: start;
}

/* Calculator Form */
.calculator-form-wrapper {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

.form-section {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-border);
}

.form-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
    color: var(--color-text);
}

.form-section-title svg {
    color: var(--color-primary);
    flex-shrink: 0;
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.required {
    color: var(--color-primary);
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    color: var(--color-text);
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.form-input:focus,
.form-select:focus {
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 3px rgba(227, 10, 23, 0.1);
    transform: translateY(-2px);
}

/* History Sidebar */
.history-sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100%;
    background: var(--color-bg-card);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.history-sidebar.open {
    right: 0;
}

.history-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.history-overlay.open {
    opacity: 1;
    visibility: visible;
}

.history-header-bar {
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-title {
    font-weight: 600;
    font-size: 1rem;
}

.history-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-secondary);
    padding: 4px;
}

.history-close:hover {
    color: var(--color-primary);
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md);
}

.history-item {
    background: var(--color-bg-alt);
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    border: 1px solid var(--color-border);
    transition: all 0.2s;
}

.history-item:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.history-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-xs);
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.history-amount {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--color-success);
}

.history-row {
    font-size: 0.875rem;
    margin-bottom: 4px;
}

.btn-load-history {
    width: 100%;
    margin-top: var(--space-sm);
    justify-content: center;
    padding: 6px;
    font-size: 0.8125rem;
}

.history-empty {
    text-align: center;
    color: var(--color-text-muted);
    padding: var(--space-xl);
}

.form-input::placeholder {
    color: var(--color-text-muted);
}

/* Number Input - Hide spinner */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.form-row {
    display: flex;
    gap: var(--space-md);
}

/* Radio Cards */
.radio-group {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.radio-card {
    cursor: pointer;
    flex: 1;
    min-width: 120px;
}

.radio-card input {
    display: none;
}

.radio-card-content {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.625rem var(--space-md);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    font-size: 0.875rem;
    font-weight: 500;
}

.radio-card-content small {
    color: var(--color-text-muted);
    font-weight: 400;
}

.radio-indicator {
    width: 18px;
    height: 18px;
    border: 2px solid var(--color-border);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.radio-card input:checked+.radio-card-content {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

.radio-card input:checked+.radio-card-content .radio-indicator {
    border-color: var(--color-primary);
}

.radio-card input:checked+.radio-card-content .radio-indicator::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Stepper Input */
.hours-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.hour-input-group {
    margin-bottom: 0;
}

.stepper-input {
    display: flex;
    align-items: center;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color var(--transition-fast);
}

.stepper-input:focus-within {
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 3px rgba(227, 10, 23, 0.1);
}

.stepper-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--color-bg-alt);
    color: var(--color-text);
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

.stepper-btn:hover {
    background: var(--color-primary);
    color: white;
}

.stepper-btn:active {
    transform: scale(0.95);
}

.stepper-value {
    flex: 1;
    text-align: center;
    border: none !important;
    border-radius: 0 !important;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem;
    box-shadow: none !important;
    transform: none !important;
}

.stepper-value:focus {
    box-shadow: none !important;
    transform: none !important;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.625rem 1.25rem;
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(135deg, #E30A17 0%, #B30813 100%);
    color: white;
    border-color: transparent;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(227, 10, 23, 0.3);
    color: white;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-border);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-light);
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
}

.btn-calculate {
    width: 100%;
}

.form-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.form-actions .btn-outline {
    flex-shrink: 0;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Results
   ============================================ */
.calculator-results-wrapper {
    position: relative;
}

.results-sticky {
    position: sticky;
    top: calc(var(--header-height) + var(--space-lg));
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.result-summary-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.result-header h3 {
    font-size: 1.125rem;
}

.result-period {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    background: var(--color-bg-alt);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
}

.net-total-display {
    text-align: center;
    padding: var(--space-xl) 0;
    margin-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.net-label {
    display: block;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.net-amount {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-primary);
    font-family: var(--font-mono);
    letter-spacing: -0.02em;
}

.result-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.result-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    background: var(--color-bg-alt);
}

.result-card-label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.result-card-value {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.9375rem;
}

.result-card-brut .result-card-value {
    color: var(--color-info);
}

.result-card-gv .result-card-value {
    color: var(--color-danger);
}

.result-card-dv .result-card-value {
    color: var(--color-warning);
}

/* Detail Card */
.result-detail-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

.detail-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.9375rem;
    margin-bottom: var(--space-md);
}

.detail-table-wrapper {
    overflow-x: auto;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.detail-table th,
.detail-table td {
    padding: 0.5rem 0.625rem;
    text-align: right;
    border-bottom: 1px solid var(--color-border);
}

.detail-table th {
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.6875rem;
}

.detail-table th:first-child,
.detail-table td:first-child {
    text-align: left;
}

.detail-table td {
    font-family: var(--font-mono);
}

.detail-table td:first-child {
    font-family: var(--font-primary);
    font-weight: 500;
}

.total-row td {
    border-bottom: none;
    padding-top: 0.75rem;
    font-size: 0.875rem;
}

/* Result Actions */
.result-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.result-actions .btn {
    flex: 1;
}

/* Info Box */
.info-box {
    display: flex;
    gap: var(--space-sm);
    align-items: flex-start;
    padding: var(--space-md);
    background: rgba(59, 130, 246, 0.08);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--color-info);
}

.info-box svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--color-info);
}

.info-box p {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

/* ============================================
   Features Section
   ============================================ */
.features-section {
    padding: var(--space-3xl) 0;
    background: var(--color-bg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

.feature-card {
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    transition: all var(--transition-base);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

.feature-card h3 {
    font-size: 1.0625rem;
    margin-bottom: var(--space-sm);
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ============================================
   FAQ Section
   ============================================ */
.faq-section {
    padding: var(--space-3xl) 0;
    background: var(--color-bg-alt);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: box-shadow var(--transition-fast);
}

.faq-item:hover {
    box-shadow: var(--shadow-sm);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text);
    text-align: left;
    transition: color var(--transition-fast);
}

.faq-question:hover {
    color: var(--color-primary);
}

.faq-arrow {
    transition: transform var(--transition-base);
    flex-shrink: 0;
    color: var(--color-text-muted);
}

.faq-item.open .faq-arrow {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base), padding var(--transition-base);
}

.faq-item.open .faq-answer {
    max-height: 300px;
}

.faq-answer p {
    padding: 0 var(--space-lg) var(--space-lg);
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: var(--color-text);
    color: rgba(255, 255, 255, 0.7);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: white;
    font-size: 1rem;
    text-decoration: none;
    margin-bottom: var(--space-md);
}

.footer-logo strong {
    color: var(--color-primary);
}

.footer-desc {
    font-size: 0.875rem;
    line-height: 1.6;
}

.footer-heading {
    color: white;
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: white;
}

.footer-badge {
    margin-top: var(--space-md);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
}

.footer-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-xl);
    font-size: 0.8125rem;
}

.footer-disclaimer svg {
    flex-shrink: 0;
    color: var(--color-warning);
    margin-top: 1px;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8125rem;
}

/* ============================================
   Cookie Banner
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--color-bg-card);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    padding: var(--space-md) var(--space-lg);
}

.cookie-content {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
}

.cookie-content p {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.cookie-content a {
    color: var(--color-primary);
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: var(--space-sm);
    flex-shrink: 0;
}

/* ============================================
   Page Content (Legal/Info Pages)
   ============================================ */
.page-section {
    padding: var(--space-3xl) 0;
}

.page-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-border);
}

.page-header .breadcrumb {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.page-header .breadcrumb a {
    color: var(--color-text-muted);
}

.page-header .breadcrumb a:hover {
    color: var(--color-primary);
}

.page-content {
    max-width: 800px;
    margin: 0 auto;
}

.page-content h2 {
    font-size: 1.5rem;
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-primary-light);
}

.page-content h3 {
    font-size: 1.125rem;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
}

.page-content p {
    margin-bottom: var(--space-md);
    line-height: 1.8;
    color: var(--color-text-secondary);
}

.page-content ul,
.page-content ol {
    margin-bottom: var(--space-md);
    padding-left: var(--space-xl);
}

.page-content ul {
    list-style: disc;
}

.page-content ol {
    list-style: decimal;
}

.page-content li {
    margin-bottom: var(--space-sm);
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.page-content strong {
    color: var(--color-text);
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

/* Utility classes */
.text-info {
    color: var(--color-info) !important;
    font-size: 0.75rem;
}

.text-success {
    color: var(--color-success) !important;
    font-size: 0.75rem;
}

.text-muted {
    color: var(--color-text-muted) !important;
}

.text-center {
    text-align: center;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: var(--color-text);
    color: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    font-size: 0.875rem;
    font-weight: 500;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    border-left: 4px solid var(--color-success);
}

.toast-error {
    border-left: 4px solid var(--color-danger);
}

/* Scroll to top (for mobile) */
.scroll-top-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    transition: all var(--transition-fast);
}

.scroll-top-btn.visible {
    display: flex;
}

.scroll-top-btn:hover {
    transform: translateY(-2px);
}

/* ============================================
   Footer Social Links
   ============================================ */
.footer-social {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
}

/* ============================================
   SEO Content Section
   ============================================ */
.seo-content-section {
    padding: var(--space-3xl) 0;
    background: var(--color-bg);
}

.seo-content {
    max-width: 800px;
    margin: 0 auto;
}

.seo-content h2 {
    font-size: 1.75rem;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 3px solid var(--color-primary);
    color: var(--color-text);
}

.seo-content h3 {
    font-size: 1.25rem;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.seo-content p {
    margin-bottom: var(--space-md);
    line-height: 1.8;
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
}

.seo-content strong {
    color: var(--color-text);
}

/* ============================================
   404 Error Page
   ============================================ */
.error-page {
    text-align: center;
    padding: var(--space-3xl) 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-content {
    max-width: 500px;
}

.error-code {
    font-size: 8rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #E30A17, #B30813);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-md);
}

.error-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
}

.error-desc {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
    line-height: 1.7;
}

.error-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   Guide Page (Article Content)
   ============================================ */
.guide-content {
    max-width: 800px;
    margin: 0 auto;
}

.guide-content .info-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-lg) 0;
    font-size: 0.875rem;
}

.guide-content .info-table th,
.guide-content .info-table td {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    text-align: left;
}

.guide-content .info-table th {
    background: var(--color-bg-alt);
    font-weight: 600;
    color: var(--color-text);
}

.guide-content .info-table td {
    color: var(--color-text-secondary);
}

.guide-content .formula-box {
    background: var(--color-bg-alt);
    border-left: 4px solid var(--color-primary);
    padding: var(--space-lg);
    border-radius: var(--radius-sm);
    margin: var(--space-lg) 0;
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    color: var(--color-text);
}

/* ============================================
   Print Styles
   ============================================ */
@media print {

    .site-header,
    .site-footer,
    .hero-section,
    .features-section,
    .faq-section,
    .seo-content-section,
    .cookie-banner,
    .history-sidebar,
    .history-overlay,
    .scroll-top-btn,
    .form-actions,
    .result-actions,
    .hero-illustration,
    .dark-mode-toggle,
    .history-btn,
    .mobile-menu-btn {
        display: none !important;
    }

    .calculator-section {
        padding: 0;
        background: white;
    }

    .calculator-layout {
        grid-template-columns: 1fr;
    }

    .calculator-results-wrapper {
        display: block !important;
    }

    .result-summary-card,
    .result-detail-card {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }

    body {
        color: #000;
        background: #fff;
    }
}

/* ============================================
   Skeleton Loader Animation
   ============================================ */
.skeleton-wrapper {
    display: none;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-xl);
}

.skeleton-wrapper.visible {
    display: flex;
}

.skeleton {
    background: var(--color-bg-alt);
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.skeleton-line {
    height: 16px;
    width: 100%;
}

.skeleton-line.w-60 {
    width: 60%;
}

.skeleton-line.w-40 {
    width: 40%;
}

.skeleton-line.w-80 {
    width: 80%;
}

.skeleton-block {
    height: 80px;
    width: 100%;
    border-radius: var(--radius-md);
}

.skeleton-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.skeleton-row {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

/* ============================================
   Contact Form States
   ============================================ */
.form-status {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.form-status.success {
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.form-status.success::before {
    content: '✓';
    font-size: 1.125rem;
    font-weight: 700;
}

.form-status.error {
    background: rgba(239, 68, 68, 0.08);
    color: #DC2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.form-status.error::before {
    content: '✕';
    font-size: 1.125rem;
    font-weight: 700;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-left: var(--space-xs);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Character counter */
.text-muted {
    color: var(--color-text-muted);
    font-size: 0.8125rem;
    margin-top: var(--space-xs);
}

/* Button disabled state */
.btn:disabled,
.btn[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================
   Article Content Styles
   ============================================ */

.article-content h2 {
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-border);
    color: var(--color-text);
    font-size: 1.5rem;
}

.article-content h3 {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
    color: var(--color-text);
    font-size: 1.125rem;
}

.article-content p {
    margin-bottom: var(--space-md);
    line-height: 1.75;
}

.article-content ul,
.article-content ol {
    margin-bottom: var(--space-md);
    padding-left: var(--space-xl);
}

.article-content li {
    margin-bottom: var(--space-xs);
    line-height: 1.7;
}

/* Info Box */
.info-box {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-lg) 0;
}

.info-box h3 {
    margin-top: 0;
    margin-bottom: var(--space-sm);
    font-size: 1rem;
}

.info-box ul {
    margin-bottom: 0;
}

.info-box-highlight {
    background: linear-gradient(135deg, rgba(227, 10, 23, 0.05), rgba(227, 10, 23, 0.02));
    border-color: var(--color-primary);
    border-left: 4px solid var(--color-primary);
}

.info-box-warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: var(--color-warning);
    border-left: 4px solid var(--color-warning);
}

/* Table of Contents */
.toc-box {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-lg) 0;
}

.toc-box h3 {
    margin-top: 0;
    margin-bottom: var(--space-sm);
    font-size: 1rem;
    font-weight: 600;
}

.toc-box ol {
    margin-bottom: 0;
    padding-left: var(--space-xl);
}

.toc-box li {
    margin-bottom: 4px;
}

.toc-box a {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 0.9375rem;
}

.toc-box a:hover {
    text-decoration: underline;
}

/* Formula Box */
.formula-box {
    background: linear-gradient(135deg, var(--color-bg-alt), var(--color-bg));
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-lg) 0;
    text-align: center;
    font-family: var(--font-mono);
}

.formula-box p {
    margin-bottom: 0;
}

/* Example Box */
.example-box {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-lg) 0;
    border-left: 4px solid var(--color-info);
}

.example-box h4 {
    margin-top: 0;
    margin-bottom: var(--space-sm);
    font-size: 1rem;
}

.example-box ul {
    margin-bottom: 0;
}

/* Data Table */
.table-responsive {
    overflow-x: auto;
    margin: var(--space-md) 0 var(--space-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.data-table th,
.data-table td {
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.data-table th {
    background: var(--color-bg-alt);
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: rgba(227, 10, 23, 0.02);
}

/* Related Articles */
.related-articles {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-2xl) 0 var(--space-lg);
}

.related-articles h3 {
    margin-top: 0;
    margin-bottom: var(--space-sm);
    font-size: 1.0625rem;
}

.related-articles ul {
    margin-bottom: 0;
    list-style: none;
    padding: 0;
}

.related-articles li {
    margin-bottom: var(--space-xs);
}

.related-articles a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.related-articles a:hover {
    text-decoration: underline;
}

/* Author Bio */
.author-bio {
    border-top: 2px solid var(--color-border);
    padding-top: var(--space-xl);
    margin-top: var(--space-2xl);
}

.author-bio h4 {
    margin-bottom: var(--space-sm);
    color: var(--color-text-secondary);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.author-bio p {
    font-size: 0.9375rem;
    line-height: 1.6;
}

.author-links a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
}

.author-links a:hover {
    text-decoration: underline;
}

/* Dark mode article overrides */
[data-theme="dark"] .info-box,
[data-theme="dark"] .toc-box,
[data-theme="dark"] .example-box,
[data-theme="dark"] .related-articles {
    background: var(--color-bg-card);
    border-color: var(--color-border);
}

[data-theme="dark"] .info-box-highlight {
    background: rgba(227, 10, 23, 0.08);
}

[data-theme="dark"] .info-box-warning {
    background: rgba(245, 158, 11, 0.1);
}

[data-theme="dark"] .formula-box {
    background: var(--color-bg-card);
}

[data-theme="dark"] .data-table th {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .data-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}