/* --- Global Styles & Variables --- */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --background-color: #f8f9fa;
    --card-background: #ffffff;
    --text-color: #333;
    --light-text-color: #ecf0f1;
    --border-color: #dee2e6;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-sm {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    color: var(--primary-color);
    margin-top: 0;
}

h1 { font-size: 3em; }
h2 { font-size: 2.2em; text-align: center; margin-bottom: 50px; }
h3 { font-size: 1.5em; }

.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--light-text-color);
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.btn-primary:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

/* --- Header & Navigation --- */
.main-header {
    background: var(--card-background);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container, .main-header .container-sm {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header-signup {
     padding: 20px 0;
     text-align: center;
     border: none;
     position: static;
}

.logo {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center; /* Fix: Vertically align nav items */
}

.main-nav li {
    margin-left: 25px;
}

.main-nav a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
}

.nav-toggle {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
}

/* --- Main Content & Sections --- */
main {
    flex-grow: 1;
}

section {
    padding: 80px 0;
}

/* --- Marketing Page: Hero Section --- */
#hero {
    background: var(--background-color);
    text-align: center;
    padding-top: 100px;
    padding-bottom: 100px;
}

#hero h1 { margin-bottom: 20px; }

#hero p {
    font-size: 1.2em;
    max-width: 700px;
    margin: 0 auto 30px auto;
}

/* --- Marketing Page: Features Section --- */
#features { background: var(--card-background); }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.feature-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
}

.feature-card .icon {
    font-size: 3em;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.feature-card h3 { margin-bottom: 15px; }

/* --- Marketing Page: How It Works Section --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--secondary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item.left { left: 0; }
.timeline-item.right { left: 50%; }

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -11px;
    background-color: white;
    border: 4px solid var(--secondary-color);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
}
.right::after { left: -11px; }

.timeline-content {
    padding: 20px 30px;
    background-color: var(--card-background);
    position: relative;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

/* --- Marketing Page: Pricing Section --- */
#pricing { background: var(--card-background); }

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    align-items: center;
}

.pricing-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    padding: 40px 20px;
    transition: all 0.3s ease;
}

.pricing-card.popular {
    border-color: var(--secondary-color);
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.pricing-card h3 { font-size: 1.3em; margin-bottom: 15px; }

.price {
    font-size: 3em;
    font-weight: bold;
    color: var(--primary-color);
}
.price span { font-size: 0.4em; font-weight: normal; }

.pricing-card ul { list-style: none; padding: 0; margin: 30px 0; }
.pricing-card li { margin-bottom: 15px; }

/* --- Marketing Page: CTA Section --- */
#cta {
    background: var(--primary-color);
    color: var(--light-text-color);
    text-align: center;
}
#cta h2 { color: var(--light-text-color); }

/* --- Signup Page Specific Styles --- */
.signup-page-main { padding: 40px 0; }
.signup-page-main h1 { font-size: 2.5em; margin-bottom: 10px; }
.signup-page-main h2 { font-size: 1.5em; font-weight: 500; margin-bottom: 40px; }

.signup-form {
    background: var(--card-background);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.form-step { margin-bottom: 30px; }

.form-step h3 {
    font-size: 1.2em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.form-group { margin-bottom: 20px; }

.form-group label { display: block; margin-bottom: 5px; font-weight: 600; }

.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-left: 8px;
    vertical-align: middle;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.input-group { display: flex; }
.input-group input { border-right: none; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group-text {
    padding: 12px;
    background: #e9ecef;
    border: 1px solid var(--border-color);
    border-left: none;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    white-space: nowrap;
}

#subdomain-status {
    font-size: 0.9em;
    margin-top: 5px;
    height: 1.2em;
}
.status-success { color: var(--success-color); }
.status-danger { color: var(--danger-color); }
.status-checking { color: #7f8c8d; }

.plan-selection { display: grid; grid-template-columns: 1fr; gap: 10px; }

.plan-option {
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.plan-option.selected {
    border-color: var(--secondary-color);
    background-color: #ecf5fc;
}

.plan-option input[type="radio"] { display: none; }
.plan-details { display: flex; justify-content: space-between; align-items: center; }
.plan-name { font-weight: bold; }
.plan-price { font-weight: bold; color: var(--primary-color); }
.form-error { color: var(--danger-color); font-size: 0.9em; margin-top: 5px; }

/* --- Utility Styles --- */
.alert { padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px; }
.alert-success { color: #3c763d; background-color: #dff0d8; border-color: #d6e9c6; }
.alert-danger { color: #a94442; background-color: #f2dede; border-color: #ebccd1; }

.pagination { margin-top: 20px; }
.pagination a, .pagination span { display: inline-block; padding: 8px 12px; margin-right: 5px; border: 1px solid var(--border-color); border-radius: 4px; text-decoration: none; color: var(--secondary-color); }
.pagination .current { background-color: var(--secondary-color); color: white; border-color: var(--secondary-color); }
.pagination .disabled { color: #aaa; pointer-events: none; border-color: #ddd; }

.filter-form { margin: 20px 0; padding: 20px; background: #f8f9fa; border-radius: 8px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.filter-form .form-group { margin-bottom: 0; }
.filter-form label { font-weight: normal; margin-right: 10px; }

/* --- Footer --- */
footer {
    background: #e9ecef;
    text-align: center;
    padding: 30px 0;
    font-size: 0.9em;
    color: #6c757d;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    color: #6c757d;
    margin: 0 10px;
}

/* --- Static Content Pages (Terms, Privacy) --- */
.static-content {
    background: var(--card-background);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: left;
}
.static-content h2 {
    text-align: left;
    font-size: 1.8em;
    margin-top: 30px;
    margin-bottom: 15px;
}
.static-content ul {
    list-style-type: disc;
    padding-left: 20px;
}
.static-content li {
    margin-bottom: 10px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    h1 { font-size: 2.5em; }
    h2 { font-size: 1.8em; }

    .main-nav { display: none; }
    .nav-toggle { display: block; }

    .main-header .container { flex-wrap: wrap; }
    .main-nav.active {
        display: block;
        width: 100%;
        background: white;
        text-align: center;
        margin-top: 15px;
    }
    .main-nav.active ul {
        flex-direction: column;
    }
    .main-nav.active li {
        margin: 15px 0;
    }

    .timeline::after { left: 15px; }
    .timeline-item { width: 100%; padding-left: 50px; padding-right: 0; }
    .timeline-item.right { left: 0%; }
    .timeline-item::after, .right::after { left: 5px; }
}

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

.font-size-lg {
    font-size: 1.1em;
}

.pricing-grid-single {
    grid-template-columns: 1fr;
}

.pricing-card-no-transform {
    transform: none;
    box-shadow: none;
}

.platform-admin-page {
    background: #fff;
}

.platform-admin-page .container {
    max-width: 1200px;
}

.platform-admin-page table {
    width: 100%;
    border-collapse: collapse;
}

.platform-admin-page th,
.platform-admin-page td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    vertical-align: middle;
}

.status-active {
    color: #27ae60;
}

.status-suspended {
    color: #c0392b;
}

.status-pending {
    color: #f39c12;
}

.platform-admin-page td form {
    margin-bottom: 5px;
}

.fee-form {
    display: flex;
    align-items: center;
    gap: 5px;
}

.fee-form input {
    width: 60px;
    padding: 5px;
}

.btn-suspend {
    background-color: #e67e22;
}

.btn-reactivate {
    background-color: #2ecc71;
}

.btn-delete {
    background-color: #c0392b;
}
