:root {
    --primary-color: #f97316;
    --secondary-color: #fb923c;
    --dark-bg: #4b5563;
    --light-bg: #f8fafc;
    --text-color: #4b5563;
    --card-bg: #ffffff;
    --feature-bg: #f8fafc;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    background: var(--light-bg);
    color: var(--text-color);
}

body.dark-theme {
    --primary-color: #c2410c;
    --secondary-color: #ea580c;
    --dark-bg: #0f172a;
    --light-bg: #1e293b;
    --text-color: #e2e8f0;
    --card-bg: #334155;
    background: var(--dark-bg);
    color: var(--text-color);
}

.navbar-toggler {
    border: none;
    padding: 8px;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(75, 85, 99, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

body.dark-theme .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(226, 232, 240, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.dropdown-menu {
    background: white;
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 10px 0;
}

body.dark-theme .dropdown-menu {
    background: #334155;
}

.dropdown-item {
    color: var(--text-color);
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: rgba(249, 115, 22, 0.1);
    color: var(--primary-color);
}

body.dark-theme .dropdown-item {
    color: #e2e8f0;
}

body.dark-theme .dropdown-item:hover {
    background: rgba(249, 115, 22, 0.1);
}

.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 999;
    transition: background 0.3s ease;
}

body.dark-theme .navbar {
    background: #1e293b;
}

.navbar .container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    order: 1;
}

.navbar-toggler {
    order: 2;
    margin-left: 15px;
}

.navbar-collapse {
    order: 3;
    flex-basis: 100%;
}

.navbar-nav {
    margin-left: 0;
}

@media (min-width: 992px) {
    .navbar-collapse {
        flex-basis: auto;
    }
    .navbar-nav {
        margin-left: auto;
    }
}

.nav-link {
    color: var(--text-color) !important;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.nav-link i {
    font-size: 1.3rem;
}

.nav-link .fa-heart {
    color: #e74c3c;
}

.nav-link:hover .fa-heart {
    color: #c0392b;
    transform: scale(1.1);
}

@media (max-width: 991px) {
    .icon-only {
        display: none;
    }
}

@media (min-width: 992px) {
    .text-only {
        display: none;
    }
    .icon-only {
        display: inline-block;
    }
}

.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
}

.docs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.docs-sidebar {
    position: sticky;
    top: 100px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

body.dark-theme .docs-sidebar {
    background: #334155;
}

.docs-sidebar h5 {
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.docs-sidebar ul {
    list-style: none;
    padding: 0;
}

.docs-sidebar li {
    margin-bottom: 10px;
}

.docs-sidebar a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    padding: 8px 15px;
    border-radius: 5px;
}

.docs-sidebar a:hover {
    background: rgba(249, 115, 22, 0.1);
    color: var(--primary-color);
    padding-left: 20px;
}

.docs-content {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

body.dark-theme .docs-content {
    background: #334155;
}

.docs-content h2 {
    color: var(--primary-color);
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(249, 115, 22, 0.2);
}

.docs-content h2:first-child {
    margin-top: 0;
}

body.dark-theme .docs-content h2 {
    color: #f1f5f9;
}

.docs-content h3 {
    color: var(--text-color);
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
}

.docs-content p {
    line-height: 1.8;
    margin-bottom: 20px;
}

.code-block {
    background: var(--dark-bg);
    color: #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    position: relative;
}

.code-block code {
    color: #e2e8f0;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: rgba(255,255,255,0.2);
}

.table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table th {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

table td {
    padding: 12px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

body.dark-theme table td {
    border-bottom-color: rgba(255,255,255,0.1);
}

table tr:nth-child(even) {
    background: rgba(0,0,0,0.02);
}

body.dark-theme table tr:nth-child(even) {
    background: rgba(255,255,255,0.02);
}

.badge-custom {
    display: inline-block;
    padding: 5px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-right: 10px;
    margin-bottom: 10px;
}

.alert-info {
    background: rgba(249, 115, 22, 0.1);
    border-left: 4px solid var(--primary-color);
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 5px;
}

.alert-info i {
    color: var(--primary-color);
    margin-right: 10px;
}

.theme-switch-wrapper {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 998;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

@media (max-width: 991px) {
    .theme-switch-wrapper {
        top: 80px;
    }
}

body.dark-theme .theme-switch-wrapper {
    background: rgba(51, 65, 85, 0.95);
}

.theme-switch {
    display: inline-block;
    height: 28px;
    position: relative;
    width: 50px;
    margin: 0 10px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #cbd5e1;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 20px;
    left: 4px;
    position: absolute;
    transition: 0.4s;
    width: 20px;
    border-radius: 50%;
}

input:checked + .slider {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

input:checked + .slider:before {
    transform: translateX(22px);
}

.theme-icon {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

body.dark-theme .theme-icon {
    color: #e2e8f0;
}

.footer {
    background: var(--dark-bg);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 30px;
    margin-bottom: 30px;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.footer-social a {
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.footer-social a:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: translateY(-3px);
}

.footer-links {
    text-align: center;
    margin-bottom: 20px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-copyright {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    line-height: 1.8;
}

.footer-copyright a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.footer-copyright a:hover {
    color: white;
}

body.dark-theme .footer {
    background: #0a0f1e;
}

@media (max-width: 768px) {
    .footer-links a {
        display: block;
        margin: 10px 0;
    }
}

@media (max-width: 991px) {
    .docs-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    .navbar-collapse {
        background: white;
        padding: 20px;
        border-radius: 10px;
        margin-top: 15px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    body.dark-theme .navbar-collapse {
        background: #334155;
    }
    .nav-item {
        margin: 5px 0;
    }
    .dropdown-menu {
        border: none;
        box-shadow: none;
        padding-left: 15px;
        background: transparent !important;
    }
    .dropdown-item {
        padding: 8px 15px;
        font-size: 0.95rem;
    }
}

.img-preview {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin: 20px 0;
}

.yagc-logo {
  display: inline-block;
  width: 24px;
  height: 20px;
  background-image: url("/images/yagc-ico.png");
  background-repeat: no-repeat;
  background-size: 24px auto;
}