:root {
    --primary: #9dbe94;
    --secondary: #8b7355;
    --accent: #f2d388;
    --background: #fff2d6;
    --text: #302b1d;
    --success: #6fa060;
    --info: #7ba8c7;
}

/* --- Base Layout & Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--background);
    color: var(--text);
    font-family: 'Lucida Sans', sans-serif;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Header / Navigation --- */
header {
    background: linear-gradient(135deg, var(--primary) 0%, #8aad80 100%);
    padding: 20px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 4px solid var(--secondary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.headerimg {
    height: 60px;
    width: 60px;
    border-radius: 14px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3), 
                inset 0 2px 4px rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    object-fit: cover;
}

.headerimg:hover {
    transform: scale(1.08) rotate(2deg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.6);
}

.header-left h1 {
    color: white;
    font-size: 1.8rem;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
    margin: 0;
    font-weight: 800;
}

header nav {
    display: flex;
    gap: 12px;
    align-items: center;
}

header nav .btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    font-weight: 700;
    padding: 10px 20px;
    backdrop-filter: blur(5px);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

header nav .btn:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

header nav .btn-primary {
    background: var(--accent);
    color: var(--text);
    border-color: var(--secondary);
    text-shadow: none;
}

header nav .btn-primary:hover {
    background: #e6c570;
    transform: translateY(-2px) scale(1.05);
}

/* Mobile menu toggle (hidden by default, shown on mobile) */
.menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.5rem;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    color: var(--text);
    font-weight: 700;
    letter-spacing: 0.5px;
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 16px;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 14px;
}

h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

p {
    margin-bottom: 12px;
}

/* --- Main Content Container --- */
main {
    flex: 1;
    padding: 40px 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Card Layout --- */
.card {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(6px);
    border-radius: 14px;
    padding: 20px 24px;
    margin: 20px auto;
    width: min(800px, 90%);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22);
}

/* Card Variations */
.card-small {
    padding: 16px 20px;
    width: min(600px, 90%);
}

.card-large {
    padding: 28px 32px;
    width: min(1000px, 95%);
}

.card-no-hover {
    transition: none;
}

.card-no-hover:hover {
    transform: none;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

/* --- Section Card (Feature Highlight) --- */
.section-card {
    background: linear-gradient(135deg, rgba(157, 190, 148, 0.25) 0%, rgba(242, 211, 136, 0.25) 100%);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 32px;
    margin: 24px auto;
    width: min(900px, 92%);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    border: 2px solid rgba(157, 190, 148, 0.4);
}

.section-card h2 {
    color: var(--secondary);
    margin-bottom: 16px;
}

/* --- Server IP Copy Box --- */
.server-ip-box {
    background: rgba(139, 115, 85, 0.15);
    border: 2px solid var(--secondary);
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
    text-align: center;
}

.server-ip-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ip-text {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
    background: rgba(255, 255, 255, 0.6);
    padding: 12px 20px;
    border-radius: 8px;
    user-select: all;
}

/* --- Buttons --- */
.btn {
    background: var(--secondary);
    color: var(--text);
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.25s ease, transform 0.2s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-family: 'Lucida Sans', sans-serif;
}

.btn:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

/* Button Variations */
.btn-primary {
    background: var(--primary);
}

.btn-primary:hover {
    background: #8aad80;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #5e8a51;
}

.btn-accent {
    background: var(--accent);
}

.btn-accent:hover {
    background: #e6c570;
}

.btn-large {
    padding: 14px 28px;
    font-size: 1.1rem;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.9rem;
}

/* Copy Button Specific Styles */
.btn-copy {
    background: var(--primary);
    font-size: 1.1rem;
    padding: 12px 24px;
}

.btn-copy:hover {
    background: var(--success);
    color: white;
}

.btn-copy.copied {
    background: var(--success);
    color: white;
}

/* --- Grid Layout --- */
.grid {
    display: grid;
    gap: 24px;
    margin: 24px 0;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* --- Feature Box --- */
.feature-box {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 2px solid rgba(157, 190, 148, 0.3);
    transition: all 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-color: var(--primary);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.feature-box h3 {
    color: var(--secondary);
    margin-bottom: 10px;
}

/* --- Info Box / Alert --- */
.info-box {
    background: rgba(123, 168, 199, 0.15);
    border-left: 4px solid var(--info);
    border-radius: 8px;
    padding: 16px 20px;
    margin: 16px 0;
}

.success-box {
    background: rgba(111, 160, 96, 0.15);
    border-left: 4px solid var(--success);
}

.warning-box {
    background: rgba(242, 211, 136, 0.25);
    border-left: 4px solid var(--accent);
}

/* --- Badge --- */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--secondary);
    color: white;
    margin: 0 4px;
}

.badge-success {
    background: var(--success);
}

.badge-primary {
    background: var(--primary);
}

.badge-accent {
    background: var(--accent);
    color: var(--text);
}

/* --- Divider --- */
.divider {
    height: 2px;
    background: linear-gradient(to right, transparent, var(--secondary), transparent);
    margin: 32px 0;
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    margin: 20px auto;
    width: min(1000px, 95%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.hero h1 {
    color: white;
    font-size: 3rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

.hero p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 24px;
}

/* --- Footer --- */
footer {
    margin-top: auto;
    padding: 16px;
    text-align: center;
    background: var(--primary);
    border-top: 3px solid rgba(0, 0, 0, 0.15);
}

/* --- Form Elements --- */
/* Input Fields */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(139, 115, 85, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--text);
    font-family: 'Lucida Sans', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 3px rgba(157, 190, 148, 0.2);
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="search"]:hover,
input[type="url"]:hover,
input[type="tel"]:hover,
input[type="number"]:hover,
input[type="date"]:hover,
input[type="time"]:hover,
textarea:hover,
select:hover {
    border-color: var(--secondary);
}

/* Textarea specific */
textarea {
    resize: vertical;
    min-height: 120px;
}

/* Select dropdown */
select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b7355' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Form Labels */
label {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
}

/* Checkbox and Radio */
input[type="checkbox"],
input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* Checkbox/Radio Label (inline) */
.checkbox-label,
.radio-label {
    display: inline-flex;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
    font-weight: normal;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group-inline {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.form-group-inline .form-control {
    flex: 1;
}

/* Form Control Wrapper */
.form-control {
    position: relative;
}

/* Input with Icon */
.input-icon {
    position: relative;
}

.input-icon input {
    padding-left: 44px;
}

.input-icon::before {
    content: attr(data-icon);
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--secondary);
    pointer-events: none;
}

/* Range Slider */
input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: rgba(139, 115, 85, 0.2);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* File Upload */
input[type="file"] {
    padding: 10px;
    border: 2px dashed rgba(139, 115, 85, 0.4);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="file"]:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.7);
}

/* Form Validation States */
.form-control.error input,
.form-control.error textarea,
.form-control.error select {
    border-color: #d9534f;
}

.form-control.success input,
.form-control.success textarea,
.form-control.success select {
    border-color: var(--success);
}

.error-message {
    color: #d9534f;
    font-size: 0.875rem;
    margin-top: 4px;
    display: block;
}

.success-message {
    color: var(--success);
    font-size: 0.875rem;
    margin-top: 4px;
    display: block;
}

/* Helper Text */
.helper-text {
    font-size: 0.875rem;
    color: rgba(48, 43, 29, 0.6);
    margin-top: 4px;
    display: block;
}

/* Required Field Indicator */
.required::after {
    content: "*";
    color: #d9534f;
    margin-left: 4px;
}

/* Disabled State */
input:disabled,
textarea:disabled,
select:disabled {
    background: rgba(200, 200, 200, 0.3);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Form Card */
.form-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 32px;
    margin: 24px auto;
    width: min(600px, 90%);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(157, 190, 148, 0.3);
}

.form-card h2 {
    color: var(--secondary);
    margin-bottom: 24px;
    text-align: center;
}

/* Search Bar */
.search-bar {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-bar input {
    padding-right: 50px;
}

.search-bar .btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 16px;
}

/* Toggle Switch */
.toggle-switch {
    display: inline-block;
    position: relative;
    width: 56px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(139, 115, 85, 0.3);
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(28px);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(157, 190, 148, 0.2);
}

/* Button Group (for forms) */
.button-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.button-group .btn {
    flex: 1;
    min-width: 120px;
}

/* --- Utility Classes --- */
.center {
    text-align: center;
}

.spacer {
    height: 20px;
}

.spacer-large {
    height: 40px;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.text-secondary {
    color: var(--secondary);
}

.text-accent {
    color: var(--accent);
}

.text-muted {
    color: rgba(48, 43, 29, 0.6);
}

.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex; 
    justify-content: center; 
    align-items: center;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 300px;
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    header {
        padding: 16px 20px;
        flex-wrap: wrap;
    }
    
    .header-left h1 {
        font-size: 1.4rem;
    }
    
    .headerimg {
        height: 48px;
        width: 48px;
    }
    
    header nav {
        flex-direction: column;
        width: 100%;
        margin-top: 12px;
        display: none;
    }
    
    header nav.active {
        display: flex;
    }
    
    .menu-toggle {
        display: block;
        margin-left: auto;
    }
    
    header nav .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .ip-text {
        font-size: 1.2rem;
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}