:root {
    --aether-teal: #00bfa5;
    --deep-nebula: #0B1C24;
    --space-black: #0B0C10;
    --panel-card-bg: #141923; 
    --starlight-white: #F4F6F9;
    --muted-text: #8a94a6;
}

body {
    background-color: var(--space-black);
    color: var(--starlight-white);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
}

.tool-bar {
    background: linear-gradient(180deg, #102A36 0%, var(--deep-nebula) 100%);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tool-title { font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 1.5rem; text-transform: uppercase; }

.dashboard-container { 
    max-width: 1200px; 
    margin: 30px auto; 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 24px; 
    padding: 0 20px; 
}

.panel-card { 
    background-color: var(--panel-card-bg); 
    border-radius: 12px; 
    padding: 24px; 
    border: 1px solid rgba(255,255,255,0.05); 
}

h3 { color: var(--aether-teal); margin-bottom: 20px; text-transform: uppercase; font-size: 0.9rem; }

.form-control {
    width: 100% !important;
    display: block;
    margin-bottom: 15px;
    padding: 12px;
    background: var(--space-black);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: var(--starlight-white);
    box-sizing: border-box;
}

#save-btn {
    width: 100%;
    padding: 14px;
    background: var(--aether-teal);
    border: 2px solid var(--space-black); /* Added a 2px black border */
    border-radius: 8px;
    color: var(--space-black);
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 10px;
    transition: opacity 0.2s;
}

#save-btn:hover {
    opacity: 0.9;
    border-color: rgba(0,0,0,0.3); /* Slight dim on hover */
}

/* Styling for the new section dividers in the form */
.form-section-title {
    font-size: 0.75rem;
    color: var(--muted-text);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 20px 0 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 5px;
}

/* Aligning the Calibration checkboxes neatly */
.checkbox-group {
    display: flex;
    justify-content: space-between;
    background: var(--space-black);
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.85rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

#leaderboard-table { width: 100%; border-collapse: collapse; }

.log-entry-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.badge {
    background: #4a90e2;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.log-details {
    color: #b0b0b0;
    line-height: 1.4;
}
/* Detailed Log Card Grid System */
.log-entry-card.detailed {
    padding: 15px;
}

.log-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two columns side-by-side */
    gap: 15px;
    margin-top: 15px;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 6px;
}

.log-data-section {
    font-size: 0.8rem;
    color: #cccccc;
    line-height: 1.5;
}

.data-label {
    display: block;
    font-size: 0.7rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 2px;
}

/* Calibration Badges */
.cal-container {
    display: flex;
    gap: 5px;
    margin-top: 4px;
}

.cal-yes, .cal-no {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

.cal-yes {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid #2ecc71;
}

.cal-no {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Leaderboard Styling */
.leaderboard-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: background 0.2s ease;
}

.leaderboard-row:hover {
    background: rgba(255, 255, 255, 0.1);
}

.rank-name {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rank-badge {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    width: 25px;
    text-align: center;
}

.rank-score {
    background: var(--accent-color); /* Makes the top score stand out */
}

/* Personal Rank Styles */
.leaderboard-separator {
    border: none;
    border-top: 1px dashed rgba(255, 255, 255, 0.2);
    margin: 15px 0;
}

.leaderboard-row.personal-rank {
    background: rgba(74, 144, 226, 0.15); /* Slight blue highlight */
    border: 1px solid rgba(74, 144, 226, 0.3);
}

/* Modal Overlay Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    max-width: 400px;
    width: 90%;
    text-align: center;
}

/* Add these styles to styles.css */
.btn-auth {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--aether-teal);
    color: var(--aether-teal);
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-auth:hover {
    background: var(--aether-teal);
    color: var(--space-black);
}

.back-home-btn {
    text-decoration: none;
    color: var(--aether-teal);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: opacity 0.2s;
}

/* Ensure consistent spacing in the toolbar */
#username-display {
    font-size: 0.9rem;
    color: var(--muted-text);
    margin-right: 15px;
}