:root {
    --bg-image: url('https://images.unsplash.com/photo-1587174486073-ae5e5cff23aa?q=80&w=1200'); 
    --glass-bg: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.18);
    --text-color: #ffffff;
    --accent-color: #4caf50; /* Klassisk golf-grön */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.65)), var(--bg-image);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: var(--text-color);
}

/* Glassmorphism-boxen */
.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 40px 30px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    text-align: center;
}

/* Bredare variant för landningssidan och dashboard */
.glass-container.wide {
    max-width: 650px;
    text-align: left;
}

/* Tillbakaknapp på inloggningssidan */
.back-home-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: background 0.2s ease;
}

.back-home-btn:hover {
    background: rgba(0, 0, 0, 0.6);
}

/* Navigation / Meny (PC) */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.main-nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.main-nav a:hover, .main-nav a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

.main-nav .admin-link {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.main-nav .admin-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Göm mobilmenyn på stora skärmar */
.mobile-nav-container {
    display: none;
}

.nav-divider {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin: 20px 0;
}

/* Rubriker och brödtext */
h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
}

.text-block {
    text-align: left;
    line-height: 1.6;
}

.text-block p {
    margin-bottom: 15px;
}

.text-block ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.text-block li {
    margin-bottom: 5px;
}

/* Formulärkomponenter */
.input-group {
    margin-bottom: 20px;
    text-align: left;
}

label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input {
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

input:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

/* Knappar */
button, .btn-danger {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

button {
    background: var(--accent-color);
    color: white;
    margin-top: 10px;
}

button:hover { 
    background: #43a047; 
}

button:active { 
    transform: scale(0.98); 
}

.btn-link {
    background: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    text-decoration: underline;
    margin-top: 15px;
    border: none;
    cursor: pointer;
}

.btn-link:hover { 
    color: #fff; 
}

.btn-danger {
    background: #e53935;
    color: white;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.btn-danger:hover { 
    background: #d32f2f; 
}

/* Statusmeddelanden (Alerts) */
.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-align: center;
}

.alert.success { 
    background: rgba(76, 175, 80, 0.25); 
    border: 1px solid #4caf50; 
}

.alert.error { 
    background: rgba(244, 67, 54, 0.25); 
    border: 1px solid #f44336; 
}

/* Medlemsprofil (Dashboard) & Deltagarlista */
.profile-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

.profile-card p { 
    margin-bottom: 8px; 
}

.members-list {
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto; 
}

.member-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.golf-id-badge {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid var(--accent-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: monospace;
}

/* Strukturella hjälpklasser */
hr { 
    border: 0; 
    border-top: 1px solid rgba(255, 255, 255, 0.15); 
    margin: 20px 0; 
}

.hidden { 
    display: none !important; 
}

/* Mobil- och surfplatteanpassning */
@media (max-width: 600px) {
    body { 
        padding: 10px; 
    }
    
    .glass-container { 
        padding: 30px 20px; 
    }

    /* Göm PC-menyn på mobilen */
    .desktop-only {
        display: none !important;
    }

    /* Visa och styla dropdown-behållaren */
    .mobile-nav-container {
        display: flex;
        flex-direction: column;
        text-align: left;
        margin-bottom: 5px;
    }

    .menu-label {
        font-size: 0.8rem;
        color: rgba(255, 255, 255, 0.6);
        margin-bottom: 6px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Dropdown menyn på mobilen */
    .mobile-dropdown {
        width: 100%;
        padding: 12px;
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 8px;
        color: #fff;
        font-size: 1rem;
        font-weight: 500;
        outline: none;
        cursor: pointer;
        appearance: none;
        -webkit-appearance: none;
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='white'><polygon points='0,0 10,0 5,5'/></svg>");
        background-repeat: no-repeat;
        background-position: right 15px center;
    }

    .mobile-dropdown option {
        background: #222; 
        color: #fff;
    }
}
