/* --- General Setup --- */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --body-bg: #f4f7f6;
    --card-bg: #ffffff;
    --text-color: #333;
    --border-radius: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--body-bg);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* --- Header & Navigation --- */
.header {
    background-color: var(--card-bg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.navbar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.nav-item {
    margin-left: 20px;
}

.nav-link {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary-color);
}

.navbar-toggler {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Main Content & Cards --- */
.main-content {
    padding: 2rem 0;
}

.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    padding: 2rem;
    margin-bottom: 2rem;
}

.card-header {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

/* --- Forms --- */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    box-sizing: border-box;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

.btn-primary { background-color: var(--primary-color); color: white; }
.btn-primary:hover { background-color: #0056b3; }
.btn-success { background-color: var(--success-color); color: white; }
.btn-success:hover { background-color: #218838; }
.btn-danger { background-color: var(--danger-color); color: white; }
.btn-danger:hover { background-color: #c82333; }

/* --- Tables --- */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
.table th, .table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}
.table th {
    background-color: var(--light-color);
    font-weight: 600;
}
.table tbody tr:hover {
    background-color: #f1f1f1;
}

/* --- Surf Page --- */
#ad-container {
    width: 100%;
    height: 600px;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}
#surf-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
#timer-bar {
    flex-grow: 1;
    height: 30px;
    background-color: #e9ecef;
    border-radius: var(--border-radius);
    overflow: hidden;
}
#timer-progress {
    height: 100%;
    width: 0%;
    background-color: var(--success-color);
    transition: width 1s linear;
}
#confirm-btn {
    padding: 0.75rem 2rem;
    font-size: 1.2rem;
}
#surf-status {
    font-weight: bold;
    color: var(--primary-color);
}

/* --- Footer --- */
.footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
    }
    
    .navbar-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        padding-top: 1rem;
        border-top: 1px solid #ddd;
    }

    .navbar-nav.active {
        display: flex;
    }

    .nav-item {
        margin: 0.5rem 0;
    }

    .navbar-toggler {
        display: block;
    }
    
    .container {
        width: 95%;
        padding: 10px;
    }
    
    .card {
        padding: 1.5rem;
    }

    #ad-container {
        height: 400px;
    }
}