/* Reset och grundläggande */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Navigationsmeny */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border-radius: 0;
    position: relative;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

/* Justera body för att kompensera för fixed navbar */
body {
    padding-top: 60px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 60px 0;
    color: white;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.tagline {
    font-size: 1.5rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.event-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

.icon {
    font-size: 1.5rem;
}

/* Main content */
main {
    background: white;
    border-radius: 20px 20px 0 0;
    margin-top: -20px;
    padding: 40px 0;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
}

/* Spots counter */
.spots-counter {
    text-align: center;
    margin-bottom: 50px;
}

.counter-card {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 30px;
    border-radius: 15px;
    display: inline-block;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.counter-card h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.counter-number {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.counter-text {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1.2;
}

.counter-total {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Sections */
section {
    margin-bottom: 60px;
    padding: 0 20px;
}

section h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-align: center;
    color: #2c3e50;
}

/* About section */
.about p {
    font-size: 1.2rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    color: #555;
}

.highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.highlight {
    text-align: center;
    padding: 30px 20px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.highlight:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.highlight .icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.highlight h3 {
    font-size: 1.2rem;
    color: #2c3e50;
}

/* Registration form */
.registration {
    max-width: 600px;
    margin: 0 auto;
}

.registration-info {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.1rem;
    color: #555;
}

.registration-info a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.registration-info a:hover {
    text-decoration: underline;
}

.registration-form {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

/* Error messages */
.error-message {
    background: #ff6b6b;
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

/* Status check section */
.status-check {
    text-align: center;
    background: #f8f9fa;
    padding: 40px;
    border-radius: 15px;
    margin: 0 20px;
}

.status-check a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.status-check a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 40px 0;
    color: white;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.donation-section {
    text-align: center;
    background: rgba(255, 255, 255, 0.15);
    padding: 30px;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    max-width: 500px;
    width: 100%;
}

.donation-section h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.donation-section p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.donation-link {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white !important;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.donation-link:hover,
.donation-link:visited,
.donation-link:active {
    color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    background: linear-gradient(135deg, #ee5a24, #ff6b6b);
}

.footer-info {
    text-align: center;
    opacity: 0.8;
}

.footer-info p {
    font-size: 1rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-links {
        flex-wrap: nowrap;
        gap: 0;
    }
    
    .nav-link {
        padding: 10px 8px;
        font-size: 0.8rem;
        text-align: center;
        min-width: 0;
        flex: 1;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .event-info {
        flex-direction: column;
        gap: 15px;
    }
    
    .counter-number {
        font-size: 2.5rem;
    }
    
    .counter-text {
        font-size: 1.5rem;
    }
    
    section h2 {
        font-size: 1.8rem;
    }
    
    .highlights {
        grid-template-columns: 1fr;
    }
    
    .registration-form {
        padding: 25px 15px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .donation-section {
        padding: 25px 20px;
        margin: 0 15px;
    }
    
    .donation-section h3 {
        font-size: 1.3rem;
    }
    
    .donation-link {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-link {
        padding: 8px 4px;
        font-size: 0.75rem;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .tagline {
        font-size: 0.9rem;
    }
    
    .counter-number {
        font-size: 2rem;
    }
    
    .counter-text {
        font-size: 1.2rem;
    }
    
    section h2 {
        font-size: 1.5rem;
    }
    
    .registration-form {
        padding: 20px 15px;
    }
    
    .donation-section h3 {
        font-size: 1.1rem;
    }
}

/* Bildspel */
.slideshow-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 auto 40px auto;
    padding: 0 0 20px 0;
}

.slideshow-container {
    position: relative;
    width: 100%;
    max-width: 700px;
    height: 520px;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slideshow-image {
    position: absolute;
    left: 0; top: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    opacity: 0;
    transition: opacity 0.7s;
    background: #222;
}

.slideshow-image.active {
    opacity: 1;
    z-index: 2;
}

.slideshow-dots {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.slideshow-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #bbb;
    cursor: pointer;
    transition: background 0.3s;
    border: none;
}

.slideshow-dot.active {
    background: #667eea;
}

@media (max-width: 900px) {
    .slideshow-container {
        max-width: 98vw;
        height: 360px;
    }
}

@media (max-width: 600px) {
    .slideshow-container {
        max-width: 100vw;
        height: 240px;
    }
    .slideshow-dot {
        width: 9px;
        height: 9px;
    }
}

/* --- Snygga admin-header-knappar --- */
.header-actions {
    margin-bottom: 28px;
}

.header-actions > div {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.download-csv,
.reload-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 140px;
    height: 44px;
    padding: 0 22px;
    font-size: 1.08rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    text-decoration: none !important;
    outline: none;
}

.reload-button {
    background: linear-gradient(90deg, #007bff 60%, #4f8cff 100%);
    color: #fff !important;
    border: none;
    position: relative;
}

.reload-button:hover,
.reload-button:focus {
    background: linear-gradient(90deg, #0056b3 60%, #357ae8 100%);
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(0,123,255,0.13);
}

.download-csv {
    background: linear-gradient(90deg, #28a745 60%, #5fd068 100%);
    color: #fff !important;
    border: none;
}

.download-csv:hover,
.download-csv:focus {
    background: linear-gradient(90deg, #218838 60%, #3cb371 100%);
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(40,167,69,0.13);
}

.logout-link {
    color: #4f8cff !important;
    font-weight: 600;
    margin-left: 18px;
    text-decoration: none !important;
    font-size: 1.08rem;
    transition: color 0.2s;
}

.logout-link:hover,
.logout-link:focus {
    color: #0056b3 !important;
    text-decoration: underline !important;
}

.reload-button .countdown-circle,
.reload-button .countdown-svg {
    width: 18px;
    height: 18px;
    margin-left: 2px;
}

.reload-text {
    display: inline-block;
    vertical-align: middle;
}

/* --- Admin dashboard full CSS --- */
.dashboard-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 20px auto;
    max-width: 1200px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.settings-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.runners-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.runners-table th,
.runners-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.runners-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.runners-table tr:hover {
    background: #f8f9fa;
}

/* Bakgrundsfärger för väntande löpare */
.runners-table tr.donated {
    background: #d4edda;
}
.runners-table tr.donated:hover {
    background: #c3e6cb;
}
.runners-table tr.deadline-passed {
    background: #f8d7da;
}
.runners-table tr.deadline-passed:hover {
    background: #f5c6cb;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}
.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}
.status-badge.verified {
    background: #d4edda;
    color: #155724;
}
.status-badge.cleared {
    background: #cce5ff;
    color: #004085;
}

.action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.btn-small {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-success {
    background: #28a745;
    color: white;
}
.btn-primary {
    background: #007bff;
    color: white;
}
.btn-danger {
    background: #dc3545;
    color: white;
}
.btn-small:hover {
    opacity: 0.8;
}

/* Tab styling */
.tab-container {
    margin: 30px 0;
}
.tab-buttons {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 20px;
}
.tab-button {
    background: none;
    border: none;
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}
.tab-button:hover {
    color: #495057;
    background: #f8f9fa;
}
.tab-button.active {
    color: #667eea;
    border-bottom: 3px solid #667eea;
    background: #f8f9fa;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

/* Countdown circle styles */
.reload-button {
    display: flex;
    align-items: center;
    gap: 8px;
}
.countdown-circle {
    position: relative;
    width: 16px;
    height: 16px;
    margin-left: 2px;
}
.countdown-svg {
    width: 16px;
    height: 16px;
    transform: rotate(-90deg);
}
.countdown-bg {
    transition: none;
}
.countdown-progress {
    transition: stroke-dashoffset 1s linear;
}
.reload-text {
    display: inline-block;
}

/* Modal för meddelanden */
.msg-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    margin-left: 4px;
}
.msg-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}
.msg-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    max-width: 400px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    position: relative;
}
.msg-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5em;
    color: #888;
    cursor: pointer;
}

/* Media queries för mobilanpassning */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 20px;
        margin: 10px;
    }
    .header-actions {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    .header-actions h1 {
        font-size: 1.5rem;
        text-align: center;
    }
    .header-actions > div {
        display: flex;
        flex-direction: row;
        gap: 10px;
        align-items: center;
    }
    .download-csv,
    .reload-button {
        min-width: unset;
        width: auto;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 10px 18px;
        font-size: 1rem;
    }
    .reload-button .countdown-circle {
        width: 16px;
        height: 16px;
        margin-left: 2px;
    }
    .reload-button .countdown-svg {
        width: 16px;
        height: 16px;
    }
    .reload-text {
        display: inline-block;
    }
    .logout-link {
        text-align: center;
        margin: 0 !important;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .stat-number {
        font-size: 1.5rem;
    }
    .stat-label {
        font-size: 0.8rem;
    }
    .settings-section {
        padding: 15px;
    }
    .settings-section form {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    .settings-section input {
        width: 100% !important;
    }
    .runners-table {
        font-size: 0.8rem;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    .runners-table th,
    .runners-table td {
        padding: 8px 6px;
        min-width: 80px;
    }
    .runners-table th:nth-child(1),
    .runners-table td:nth-child(1) {
        min-width: 60px;
    }
    .runners-table th:nth-child(2),
    .runners-table td:nth-child(2) {
        min-width: 100px;
    }
    .runners-table th:nth-child(3),
    .runners-table td:nth-child(3) {
        min-width: 120px;
    }
    .runners-table th:nth-child(4),
    .runners-table td:nth-child(4) {
        min-width: 80px;
    }
    .runners-table th:nth-child(5),
    .runners-table td:nth-child(5) {
        min-width: 90px;
    }
    .runners-table th:nth-child(6),
    .runners-table td:nth-child(6),
    .runners-table th:nth-child(7),
    .runners-table td:nth-child(7) {
        min-width: 70px;
    }
    .runners-table th:nth-child(8),
    .runners-table td:nth-child(8) {
        min-width: 120px;
    }
    .action-buttons {
        flex-direction: column;
        gap: 3px;
    }
    .btn-small {
        padding: 6px 8px;
        font-size: 0.7rem;
        width: 100%;
        text-align: center;
    }
    .status-badge {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    h3 {
        font-size: 1.2rem;
    }
}
@media (max-width: 480px) {
    .dashboard-container {
        padding: 15px;
        margin: 5px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .header-actions h1 {
        font-size: 1.3rem;
    }
    .runners-table {
        font-size: 0.75rem;
    }
    .runners-table th,
    .runners-table td {
        padding: 6px 4px;
    }
    .btn-small {
        padding: 5px 6px;
        font-size: 0.65rem;
    }
}
.settings-section form {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}
.settings-section input {
    width: 100% !important;
}
.settings-section > div > div {
    flex-direction: column;
    gap: 10px;
}
.settings-section > div > div > form {
    width: 100%;
}
.settings-section > div > div > form > button {
    width: 100%;
    padding: 10px;
} 