/* ============================================
   PRT Race Control - Complete Stylesheet
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #0F1830;
    color: white;
    line-height: 1.6;
}

header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(15, 24, 48, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(to right, #E56C0D, #FFB75E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
    padding-bottom: 4px;
}

nav a:hover {
    color: #E56C0D;
}

nav a.active {
    color: #E56C0D !important;
    font-weight: 600;
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #E56C0D, #FFB75E);
    border-radius: 2px 2px 0 0;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

nav a.admin-link {
    color: #E56C0D;
    font-weight: 600;
}

nav a.admin-link::before {
    content: "\1F512\00A0";
    font-size: 0.9em;
}

nav a.admin-link:hover {
    color: #F7A047;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-login {
    padding: 0.625rem 1.75rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9375rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.btn-primary {
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    background: linear-gradient(135deg, #E56C0D, #F7A047);
    border: none;
    color: white;
    cursor: pointer;
    transition: transform 0.3s;
}

.btn-primary:hover {
    transform: scale(1.05);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

		/* ==================== MOBILE MENU ==================== */
		.mobile-menu {
			display: block;
			position: fixed;
			top: 0;
			right: -100%;
			width: 80%;
			max-width: 300px;
			height: 100vh;
			height: 100dvh;
			background-color: #0F1830;
			padding: 1rem;
			padding-bottom: calc(1rem + env(safe-area-inset-bottom));
			transition: right 0.3s ease;
			z-index: 1100;
			box-shadow: -2px 0 10px rgba(0, 0, 0, 0.5);
			overflow-y: scroll;
			-webkit-overflow-scrolling: touch;
			overscroll-behavior: contain; /* ← Prevents bounce-back */
		}

		.mobile-menu.active {
			right: 0;
		}

		.mobile-menu a {
			display: block;
			color: rgba(255, 255, 255, 0.8);
			text-decoration: none;
			padding: 0.75rem 0;
			border-bottom: 1px solid rgba(255, 255, 255, 0.1);
			font-size: 0.95rem;
			transition: color 0.3s;
		}

		.mobile-menu a:hover,
		.mobile-menu a.active {
			color: #E56C0D;
		}

		.mobile-menu a:last-child {
			border-bottom: none;
		}

		/* Mobile Tools Section - Collapsible */
		.mobile-tools-section {
			border-top: 1px solid rgba(255, 255, 255, 0.1);
			margin-top: 10px;
			padding-top: 10px;
		}

		.mobile-tools-header {
			padding: 12px 0;
			color: rgba(255, 255, 255, 0.8);
			font-size: 0.95rem;
			font-weight: 600;
			cursor: pointer;
			transition: color 0.3s;
			user-select: none;
			-webkit-tap-highlight-color: transparent;
			display: flex;
			justify-content: space-between;
			align-items: center;
		}

		.mobile-tools-header:active {
			color: #E56C0D;
		}

		.mobile-tools-content {
			overflow: hidden;
			transition: max-height 0.3s ease;
		}

		.mobile-tools-content a {
			padding: 0.75rem 0;
			padding-left: 1rem;
			font-size: 0.9rem;
			opacity: 0.9;
		}

		.mobile-tools-arrow {
			font-size: 0.7rem;
			transition: transform 0.3s;
		}

.mobile-menu a.admin-link::before {
    content: none !important;
}

main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Featured Tools Section */
.featured-tools-section {
    margin-bottom: 4rem;
}

.featured-tools-header {
    text-align: center;
    padding: 2rem 2rem;
    border-radius: 20px;
    border: 2px solid #334155;
    background: linear-gradient(135deg, rgba(229, 108, 13, 0.05) 0%, rgba(13, 147, 218, 0.05) 100%);
    animation: pulse-very-subtle 5s ease-in-out infinite;
    margin-bottom: 3rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

@keyframes pulse-very-subtle {
    0%, 100% { box-shadow: 0 0 15px rgba(229, 108, 13, 0.2); }
    50% { box-shadow: 0 0 30px rgba(229, 108, 13, 0.35); }
}

.featured-tools-title {
    font-size: 3.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #E56C0D 0%, #FFB75E 50%, #0D93DA 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 5s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.featured-tools-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.6);
}

.featured-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.featured-tool-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    border-radius: 24px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 200px;
}

.featured-tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.featured-tool-icon {
    flex-shrink: 0;
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.icon-wrapper.rt {
    background: linear-gradient(135deg, #E56C0D, #F7A047);
    box-shadow: 0 8px 24px rgba(229, 108, 13, 0.3);
}

.icon-wrapper.dp {
    background: linear-gradient(135deg, #0D93DA, #4FB8E8);
    box-shadow: 0 8px 24px rgba(13, 147, 218, 0.3);
}

.featured-tool-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.featured-tool-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
    color: #E56C0D;
}

.featured-tool-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
}

.featured-tool-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.feature-tag {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: rgba(229, 108, 13, 0.2);
    color: #E56C0D;
    border: 1px solid rgba(229, 108, 13, 0.4);
}

.featured-tool-arrow {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.4);
    transition: transform 0.3s ease;
}

.featured-tool-card:hover .featured-tool-arrow {
    transform: translateX(8px);
    color: rgba(255, 255, 255, 0.8);
}

/* Leagues Grid */
.leagues-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.league-container {
    border-radius: 24px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.league-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.league-container.tnl {
    border-color: rgba(229, 108, 13, 0.3);
}

.league-container.snl {
    border-color: rgba(13, 147, 218, 0.3);
}

.league-header {
    padding: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.league-header.tnl {
    background: linear-gradient(135deg, rgba(229, 108, 13, 0.15), rgba(229, 108, 13, 0.05));
}

.league-header.snl {
    background: linear-gradient(135deg, rgba(13, 147, 218, 0.15), rgba(13, 147, 218, 0.05));
}

.league-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.league-title {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.league-title.tnl {
    color: #E56C0D;
}

.league-title.snl {
    color: #0D93DA;
}

.league-subtitle {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.league-description {
    color: rgba(255, 255, 255, 0.6);
}

.league-icon {
    font-size: 4rem;
}

.league-icon.tnl {
    color: #E56C0D;
}

.league-icon.snl {
    color: #0D93DA;
}

.league-body {
    padding: 2rem;
    background-color: #1e263c;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.league-action-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* PILL BUTTON FIX - Clean, no !important */
.btn-action {
    flex: 1;
    padding: 0.875rem 1.75rem;
    border-radius: 50px;
    border: 2px solid;
    background: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-action.tnl {
    border-color: #E56C0D;
}

.btn-action.snl {
    border-color: #0D93DA;
}

.btn-action:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-action.tnl:hover {
    background-color: #E56C0D;
    color: white;
    box-shadow: 0 4px 16px rgba(229, 108, 13, 0.4);
}

.btn-action.snl:hover {
    background-color: #0D93DA;
    color: white;
    box-shadow: 0 4px 16px rgba(13, 147, 218, 0.4);
}

.btn-action.single-btn {
    flex: 1;
    width: 100%;
}

.races-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.races-header h3 {
    font-size: 1.25rem;
    font-weight: bold;
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
    overflow-y: auto;
    min-height: 300px;
}

.schedule-item {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.schedule-item:hover {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.schedule-item.tnl:hover {
    border-color: rgba(229, 108, 13, 0.5);
    box-shadow: 0 4px 20px rgba(229, 108, 13, 0.2);
}

.schedule-item.snl:hover {
    border-color: rgba(13, 147, 218, 0.5);
    box-shadow: 0 4px 20px rgba(13, 147, 218, 0.2);
}

.schedule-round {
    font-weight: bold;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    min-width: 40px;
}

.schedule-flag {
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.country-flag-img {
    width: 40px;
    height: 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.country-flag-img:hover {
    transform: scale(1.15);
}

.schedule-info {
    flex: 1;
}

.schedule-circuit {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.schedule-details {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.schedule-date-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.schedule-status {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
}

.status-badge {
    white-space: nowrap;
}

.schedule-date {
    font-size: 0.875rem;
    font-weight: 600;
    text-align: right;
    min-width: 80px;
}

/* Race Modal */
.race-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow-y: auto;
}

.race-modal.active {
    display: flex;
}

.race-modal-content {
    max-width: 700px;
    width: 100%;
    border-radius: 24px;
    background-color: #0F1830;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 32px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background-color: rgba(229, 108, 13, 0.95);
    transform: rotate(90deg) scale(1.1);
}

		/* Footer */
		footer {
			border-top: 1px solid rgba(255, 255, 255, 0.1);
			padding: 3rem 1.5rem;
			background-color: #0F1830;
		}

		.footer-container {
			max-width: 1400px;
			margin: 0 auto;
		}

		/* 5-Column Grid */
		.footer-grid {
			display: grid;
			grid-template-columns: repeat(5, 1fr);
			gap: 2rem;
			margin-bottom: 2rem;
		}

		.footer-column h4 {
			font-weight: bold;
			margin-bottom: 1rem;
			font-size: 1rem;
		}

		.footer-links {
			display: flex;
			flex-direction: column;
			gap: 0.5rem;
		}

		.footer-links a {
			color: rgba(255, 255, 255, 0.6);
			text-decoration: none;
			font-size: 0.875rem;
			transition: color 0.3s;
		}

		.footer-links a:hover {
			color: #E56C0D;
		}

		/* External link indicator */
		.footer-links a[target="_blank"]::after {
			content: " ↗";
			font-size: 0.75rem;
			opacity: 0.5;
		}

		.footer-bottom {
			text-align: center;
			padding-top: 2rem;
			border-top: 1px solid rgba(255, 255, 255, 0.1);
			color: rgba(255, 255, 255, 0.4);
			font-size: 0.875rem;
		}
		/* Responsive Design */

		/* Tablet - 3 columns */
		@media (max-width: 1024px) {
			.footer-grid {
				grid-template-columns: repeat(3, 1fr);
				gap: 1.5rem;
			}
		}

		/* Mobile - 2 columns */
		@media (max-width: 768px) {
			footer {
				padding: 2rem 1rem;
			}
			
			.footer-grid {
				grid-template-columns: repeat(2, 1fr);
				gap: 1.5rem;
			}
			
			.footer-column h4 {
				font-size: 0.95rem;
			}
			
			.footer-links a {
				font-size: 0.8rem;
			}
		}

		/* Small Mobile - 1 column */
		@media (max-width: 480px) {
			.footer-grid {
				grid-template-columns: 1fr;
				gap: 1.5rem;
			}
			
			.footer-column {
				text-align: center;
			}
			
			.footer-links {
				align-items: center;
			}
		}
/* Responsive */
@media (max-width: 1024px) {
    /* Hide navigation on tablets/iPads */
    nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .btn-login, .btn-primary {
        display: none;
    }
    
    .featured-tools-grid {
        grid-template-columns: 1fr;
    }
    
    .leagues-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .btn-login, .btn-primary {
        display: none;
    }

    .featured-tools-header {
        padding: 1.5rem;
    }

    .featured-tools-title {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .featured-tool-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
        min-height: auto;
    }

    .featured-tool-arrow {
        display: none;
    }

    .icon-wrapper {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .league-header {
        padding: 1.5rem;
    }

    .league-title {
        font-size: 2.5rem;
    }

    .league-body {
        padding: 1.5rem;
    }

    .schedule-item {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto auto;
        gap: 0.5rem;
        padding: 1rem;
    }

    .schedule-round {
        grid-column: 1;
        grid-row: 1;
    }

    .schedule-info {
        grid-column: 2;
        grid-row: 1;
    }

    .schedule-details {
        grid-column: 1 / 3;
        grid-row: 2;
        padding-left: 2.5rem;
        font-size: 0.75rem;
    }

    .schedule-flag {
        grid-column: 1;
        grid-row: 3;
        min-width: 36px;
    }

    .country-flag-img {
        width: 32px;
        height: 22px;
    }

    .schedule-date-status {
        grid-column: 2;
        grid-row: 3;
        flex-wrap: wrap;
    }

    .modal-close {
        width: 52px;
        height: 52px;
        font-size: 36px;
        top: 1rem;
        right: 1rem;
    }
}