:root {
    --bg-inverted: #2E363F;
    --bg-lifted: #F8F9FA;
    --bg-accented: #F0F1F3;
    --grayscale: #6C757D;
    --grayscale-lifted: #4A5159;
    --grayscale-accented: #3A4148;
    --text: #444;
    --text-accented: #222;
    --text-muted: #888;
    --text-lifted: #CCC;
    --border: #E5E5E5;
    --border-muted: #F0F0F0;
    --border-lifted: #D5D5D5;
    --border-accented: #C5C5C5;
    --info: #17A2B8;
    --success: #28A745;
    --warning: #FFC107;
    --error: #DC3545;
    --neutral: #999;
    --rounding-sm: 4px;
    --rounding-md: 8px;
    --rounding-lg: 12px;
    --letter-spacing: -0.01em;
    --disabled-opacity: 0.6;
}

* { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg-lifted);
    letter-spacing: var(--letter-spacing);
}

a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: var(--text-accented);
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-accented);
}

/* Header */
.site-header {
    background-color: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.site-header .navbar {
    min-height: 64px;
    padding: 0;
}
.site-header .navbar-brand {
    padding: 0;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.brand-text { color: var(--text-accented); }
.brand-accent { color: var(--grayscale); }

.site-header .nav-link {
    font-size: 15px;
    color: var(--text) !important;
    padding: 0.5rem 1rem !important;
    border-radius: var(--rounding-md);
    transition: background 0.2s ease, color 0.2s ease;
}
.site-header .nav-link:hover {
    background-color: var(--bg-accented);
    color: var(--text-accented) !important;
}
.site-header .nav-item.active .nav-link {
    color: var(--text-accented) !important;
    font-weight: 600;
}
.site-header .navbar-toggler {
    border: 1px solid var(--border);
    border-radius: var(--rounding-sm);
    outline: none;
}
.site-header .navbar-toggler:focus { box-shadow: none; }

/* Buttons */
.btn-primary {
    background: var(--bg-inverted);
    border-color: var(--grayscale);
    border-radius: var(--rounding-md);
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background: var(--grayscale-lifted);
    border-color: var(--grayscale-lifted);
}
.btn-primary:focus { box-shadow: 0 0 0 0.2rem rgba(46,54,63,0.25); }

.btn-outline-primary {
    color: var(--text);
    border: 1px solid var(--grayscale);
    border-radius: var(--rounding-md);
    background: transparent;
}
.btn-outline-primary:hover {
    background: var(--bg-inverted);
    color: #fff;
    border-color: var(--bg-inverted);
}

.btn-default {
    color: #333;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: var(--rounding-md);
}
.btn-default:hover {
    background: var(--grayscale-lifted);
    color: #fff;
    border-color: var(--grayscale-lifted);
}

/* Main */
#main-body {
    min-height: calc(100vh - 64px - 220px);
}

/* Cards */
.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--rounding-md);
    margin-bottom: 16px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.card-body { padding: 24px; }
.card-title { font-size: 1.25rem; margin-bottom: 0.75rem; }

.card-accent-green { border-top: 3px solid var(--success); }
.card-accent-blue { border-top: 3px solid var(--info); }
.card-accent-orange { border-top: 3px solid var(--warning); }
.card-accent-red { border-top: 3px solid var(--error); }
.card-accent-silver { border-top: 3px solid var(--border-lifted); }
.card-accent-midnight-blue { border-top: 3px solid var(--grayscale-lifted); }

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--bg-inverted) 0%, var(--grayscale-accented) 100%);
    color: #fff;
    padding: 80px 0 70px;
}
.hero h1 {
    color: #fff;
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}
.hero p {
    color: rgba(255,255,255,0.75);
    font-size: 1.15rem;
    font-weight: 300;
    margin-bottom: 2rem;
}
.hero-tagline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: var(--rounding-md);
    margin-bottom: 1.25rem;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.hero-tagline i {
    color: var(--accent);
    font-size: 1.1rem;
}
.hero .btn-primary {
    background: #fff;
    color: var(--bg-inverted);
    border-color: #fff;
    padding: 0.6rem 2rem;
    font-size: 1.05rem;
}
.hero .btn-primary:hover {
    background: var(--bg-accented);
    color: var(--bg-inverted);
    border-color: var(--bg-accented);
}
.hero .btn-outline-light {
    border-color: rgba(255,255,255,0.4);
    color: #fff;
    padding: 0.6rem 2rem;
    font-size: 1.05rem;
    border-radius: var(--rounding-md);
}
.hero .btn-outline-light:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* Sections */
.section { padding: 60px 0; }
.section-light { background: var(--bg-lifted); }
.section-white { background: #fff; }
.section-dark { background: var(--bg-inverted); color: #fff; }
.section-dark h2, .section-dark h3 { color: #fff; }

.section-title {
    text-align: center;
    margin-bottom: 50px;
}
.section-title h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.section-title p {
    color: var(--grayscale);
    font-size: 1.1rem;
    font-weight: 300;
}

/* How it works */
.how-it-works .step-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--bg-accented);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.8rem;
    color: var(--grayscale-lifted);
    transition: transform 0.3s ease, background 0.3s ease;
}
.how-it-works .card:hover .step-icon {
    transform: scale(1.1);
    background: var(--bg-inverted);
    color: #fff;
}
.how-it-works .step-number {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--border-muted);
    line-height: 1;
}

/* Feature cards */
.feature-card {
    text-align: center;
    height: 100%;
}
.feature-card .feature-icon {
    font-size: 2.2rem;
    color: var(--grayscale-lifted);
    margin-bottom: 1rem;
}

/* Plan cards */
.plan-card {
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.plan-card .plan-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-accented);
}
.plan-card .plan-price .plan-period {
    font-size: 1rem;
    font-weight: 400;
    color: var(--grayscale);
}
.plan-card .plan-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    text-align: left;
}
.plan-card .plan-features li {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border-muted);
    color: var(--text);
}
.plan-card .plan-features li:last-child { border-bottom: none; }
.plan-card .plan-features li i { color: var(--success); margin-right: 0.5rem; }
.plan-card .btn { margin-top: auto; }

/* Builder */
.builder-container { padding: 40px 0; }
.builder-sliders .slider-group { margin-bottom: 2rem; }
.builder-sliders .slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.builder-sliders .slider-label .label-name {
    font-weight: 600;
    color: var(--text-accented);
}
.builder-sliders .slider-label .label-value {
    font-weight: 700;
    color: var(--bg-inverted);
    background: var(--bg-accented);
    padding: 2px 12px;
    border-radius: var(--rounding-sm);
    font-size: 0.9rem;
}
.builder-sliders input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: var(--border);
    outline: none;
}
.builder-sliders input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg-inverted);
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    transition: transform 0.15s ease;
}
.builder-sliders input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }
.builder-sliders input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg-inverted);
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.summary-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--rounding-md);
    padding: 24px;
    position: sticky;
    top: 80px;
}
.summary-panel h3 { font-size: 1.3rem; margin-bottom: 1.5rem; }
.summary-panel .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-muted);
    font-size: 0.95rem;
}
.summary-panel .summary-row:last-of-type { border-bottom: none; }
.summary-panel .summary-total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--bg-inverted);
    font-size: 1.5rem;
    font-weight: 700;
}
.summary-panel .summary-total .price-period {
    font-size: 1rem;
    font-weight: 400;
    color: var(--grayscale);
}

.preset-btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Domain search */
.domain-search-section { padding: 60px 0; }
.domain-search-box {
    max-width: 600px;
    margin: 0 auto;
}
.domain-search-box .input-group {
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border-radius: var(--rounding-md);
    overflow: hidden;
}
.domain-search-box .form-control {
    border: 2px solid var(--border);
    border-right: none;
    border-radius: var(--rounding-md) 0 0 var(--rounding-md);
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
    height: auto;
}
.domain-search-box .form-control:focus {
    border-color: var(--grayscale-lifted);
    box-shadow: none;
}
.domain-search-box .btn {
    border-radius: 0 var(--rounding-md) var(--rounding-md) 0;
    padding: 0.75rem 1.5rem;
    font-size: 1.05rem;
}
.domain-tlds {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--grayscale);
    font-size: 1.2rem;
    font-weight: 300;
}

/* Network status */
.status-table {
    background: #fff;
    border-radius: var(--rounding-md);
    overflow: hidden;
    border: 1px solid var(--border);
}
.status-table table { margin: 0; }
.status-table th {
    background: var(--bg-accented);
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    color: var(--text-accented);
}
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}
.status-badge.operational {
    background: #E8F5E9;
    color: #2E7D32;
}

/* 404 */
.error-page {
    text-align: center;
    padding: 80px 0;
}
.error-page h1 {
    font-size: 5rem;
    color: var(--grayscale);
    margin-bottom: 1rem;
}
.error-page p {
    font-size: 1.2rem;
    color: var(--grayscale);
    margin-bottom: 2rem;
}

/* Footer */
.site-footer {
    background: var(--bg-inverted);
    color: #fff;
    padding: 50px 0 20px;
    margin-top: auto;
}
.site-footer .footer-brand { margin-bottom: 1.5rem; }
.site-footer .brand-text { color: #fff; }
.site-footer .brand-accent { color: var(--text-lifted); }
.site-footer .footer-tagline {
    color: rgba(255,255,255,0.5);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}
.site-footer h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}
.site-footer .footer-links ul li { margin-bottom: 0.5rem; }
.site-footer .footer-links a {
    color: rgba(255,255,255,0.65);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}
.site-footer .footer-links a:hover { color: #fff; }
.site-footer .footer-bottom {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}
.site-footer .footer-bottom p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 1.8rem; }
    .hero p { font-size: 1rem; }
    .hero-tagline { font-size: 1.05rem; padding: 0.4rem 1rem; }
    .section { padding: 40px 0; }
    .section-title h2 { font-size: 1.5rem; }
    .summary-panel { position: static; }
    .site-footer { text-align: center; }
    .site-footer .footer-links { margin-bottom: 1.5rem; }
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.6s ease forwards; }

.card { animation: fadeInUp 0.5s ease forwards; }

/* Hero demo card */
.hero-demo {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--rounding-md);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    overflow: hidden;
    position: relative;
}
.hero-demo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: var(--bg-accented);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-accented);
    border-bottom: 1px solid var(--border);
}
.hero-demo-header i { margin-right: 0.4rem; }
.hero-demo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 6px rgba(40,167,69,0.5);
    animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.hero-demo-content {
    padding: 12px 16px;
    position: relative;
    height: 230px;
    display: flex;
    flex-direction: column;
}
.hero-demo-scroll {
    flex: 1;
    overflow: hidden;
    position: relative;
}
.hero-demo-body {
    position: relative;
}

.demo-slider-group { margin-bottom: 0.5rem; }
.demo-checkbox-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.1rem;
    margin-bottom: 0.5rem;
}
.demo-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.demo-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.demo-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}
.demo-check-mark {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid var(--border);
    background: var(--bg-accented);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}
.demo-check-mark i {
    font-size: 0.65rem;
    color: #fff;
}
.demo-checkbox-group[data-key="ssl"] .demo-check-mark {
    background: var(--success);
    border-color: var(--success);
    opacity: 1;
}
.demo-checkbox-group[data-key="ssh"] .demo-check-mark {
    background: var(--success);
    border-color: var(--success);
    opacity: 1;
}
.demo-checkbox-free {
    font-size: 0.72rem;
    color: var(--success);
    font-weight: 600;
}
.demo-slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}
.demo-label-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-accented);
}
.demo-label-value {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--bg-inverted);
    background: var(--bg-accented);
    padding: 1px 10px;
    border-radius: var(--rounding-sm);
    min-width: 50px;
    text-align: center;
}
.hero-demo input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 5px;
    border-radius: 3px;
    background: var(--border);
    outline: none;
    pointer-events: none;
}
.hero-demo input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-inverted);
    cursor: default;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    transition: transform 0.15s ease;
}
.hero-demo input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-inverted);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.demo-deploy-btn {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.45rem;
    border: 1px solid var(--grayscale);
    border-radius: var(--rounding-md);
    background: var(--bg-inverted);
    color: #fff;
    font-weight: 600;
    font-size: 0.82rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}
.demo-deploy-btn:hover {
    background: var(--primary);
    transform: translateY(-1px);
}
.demo-deploy-btn i { margin-right: 0.4rem; }

.demo-cursor {
    position: absolute;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease, left 0.05s linear, top 0.05s linear;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

@media (max-width: 768px) {
    .hero-demo { margin-top: 1.5rem; }
    .hero-demo-content { height: 210px; }
    .demo-slider-group { margin-bottom: 0.35rem; }
    .demo-label-name { font-size: 0.7rem; }
    .demo-label-value { font-size: 0.65rem; padding: 1px 8px; min-width: 44px; }
    .demo-deploy-btn { font-size: 0.75rem; padding: 0.35rem; }
}
