@font-face {
    font-family: 'Formula1';
    src: url('Formula1-Regular_web_0.ttf') format('truetype');
    font-weight: normal;
}

@font-face {
    font-family: 'Formula1';
    src: url('Formula1-Bold_web_0.ttf') format('truetype');
    font-weight: bold;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Formula1', Arial, sans-serif;
    line-height: 1.6;
    color: white;
    background: linear-gradient(135deg, #2d1b69 0%, #1a0f3d 100%);
    min-height: 100vh;
}

/* Navigation */
.navbar {
    background: rgba(45, 27, 105, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid #ff6b35;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h2 {
    color: #ff6b35;
    font-weight: bold;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 3rem;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: bold;
    font-size: 1.1rem;
    padding-bottom: 0.25rem;
    border-bottom: 2px solid transparent;
}

.nav-menu a:hover {
    color: #ff6b35;
}

.nav-menu a.active {
    color: #ff6b35;
    border-bottom: 2px solid #ff6b35;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Hero Section */
.hero {
    position: relative;
    height: 60vh;
    overflow: hidden;
    margin-top: 70px;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.8), rgba(255, 127, 80, 0.6));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
}

.hero-overlay h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-overlay p {
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

/* Schedule Section */
.schedule-section h2,
.leaderboard-section h2 {
    margin-bottom: 1.5rem;
    color: #1e3a8a;
    border-bottom: 3px solid #ff7f50;
    padding-bottom: 0.5rem;
    font-weight: bold;
}

.race-item {
    display: grid;
    grid-template-columns: auto auto 1fr auto auto auto;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid #ff7f50;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 4px rgba(30, 58, 138, 0.1);
}

.race-round {
    font-weight: bold;
    color: #1e3a8a;
}

.race-type {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    text-align: center;
    min-width: 80px;
}

.race-type.f1 {
    background: #ff7f50;
    color: white;
}

.race-type.endurance {
    background: #1e3a8a;
    color: white;
}

.race-type.rally {
    background: #87ceeb;
    color: #1e3a8a;
}

.race-type.break {
    background: #666;
    color: white;
}

.race-item.mid-season-break {
    background: rgba(102, 102, 102, 0.1);
    border-color: #666;
}

.race-location {
    font-weight: 500;
    color: #1e3a8a;
}

.race-day-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.race-day {
    color: #1e3a8a;
    font-size: 0.8rem;
    font-weight: bold;
    opacity: 0.9;
}

.race-date {
    color: #1e3a8a;
    font-size: 0.9rem;
    opacity: 0.8;
}

.race-duration {
    color: #ff7f50;
    font-size: 0.85rem;
    font-weight: bold;
    text-align: center;
}

.race-time {
    color: #ff7f50;
    font-size: 0.85rem;
    font-weight: bold;
}

/* Leaderboard Section */
.tab-container {
    display: flex;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #ff7f50;
}

.tab-button {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    color: #1e3a8a;
}

.tab-button.active {
    background: #ff7f50;
    color: white;
}

.tab-button:hover:not(.active) {
    background: rgba(255, 127, 80, 0.2);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.leaderboard-item {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid #ff7f50;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 4px rgba(30, 58, 138, 0.1);
}

.position {
    font-weight: bold;
    font-size: 1.2rem;
    color: #ff7f50;
    min-width: 30px;
}

.name {
    font-weight: bold;
    color: #1e3a8a;
}

.team {
    color: #1e3a8a;
    font-size: 0.9rem;
    opacity: 0.8;
}

.points {
    font-weight: bold;
    color: #1e3a8a;
    font-size: 1.1rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #1e3a8a;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 1rem 0;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .schedule-section h2 {
        margin-top: 2rem;
        padding-top: 1rem;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
        margin-top: 20px;
    }
    
    .race-item {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        grid-template-rows: auto auto auto;
        gap: 0.5rem;
        text-align: center;
        padding: 1rem 0.75rem;
        grid-template-areas: 
            "round type duration"
            "location location location"
            "day-date day-date time";
    }
    
    .race-round {
        grid-area: round;
        font-size: 1.2rem;
        color: #ff7f50;
        font-weight: bold;
        align-self: center;
        justify-self: center;
    }
    
    .race-type {
        grid-area: type;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        align-self: center;
        justify-self: center;
    }
    
    .race-duration {
        grid-area: duration;
        font-size: 0.75rem;
        color: #ff7f50;
        font-weight: bold;
        align-self: center;
        justify-self: center;
    }
    
    .race-location {
        grid-area: location;
        font-size: 1.1rem;
        font-weight: bold;
        margin: 0.25rem 0;
        justify-self: center;
    }
    
    .race-day-date {
        grid-area: day-date;
        flex-direction: row;
        gap: 0.5rem;
        justify-content: center;
        align-self: center;
    }
    
    .race-day, .race-date {
        font-size: 0.85rem;
    }
    
    .race-time {
        grid-area: time;
        font-size: 0.9rem;
        align-self: center;
        justify-self: center;
    }
    
    .race-item.mid-season-break {
        background: rgba(102, 102, 102, 0.2);
        border-color: #666;
    }
    
    .leaderboard-item {
        grid-template-columns: auto 1fr auto;
        gap: 0.5rem;
    }
    
    .team {
        grid-column: 2;
        font-size: 0.8rem;
    }
}

/* Regulations Page */
.regulations-content {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.regulations-container h1 {
    color: #1e3a8a;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 4px solid #ff7f50;
    padding-bottom: 1rem;
}

.regulation-section {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #ff7f50;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(30, 58, 138, 0.1);
}

.regulation-section h2 {
    color: #1e3a8a;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #ff7f50;
    padding-bottom: 0.5rem;
}

.regulation-section h3 {
    color: #1e3a8a;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.regulation-section p {
    color: #1e3a8a;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.regulation-section ul {
    color: #1e3a8a;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.regulation-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.points-table {
    margin-bottom: 2rem;
}

.points-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.points-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(30, 58, 138, 0.1);
    border-radius: 5px;
    border-left: 4px solid #ff7f50;
}

.points-row .position {
    font-weight: bold;
    color: #1e3a8a;
}

.points-row .points {
    font-weight: bold;
    color: #ff7f50;
    font-size: 1.1rem;
}

.vehicle-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.spec-category {
    background: rgba(30, 58, 138, 0.05);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #ff7f50;
}

.spec-category h3 {
    margin-top: 0;
    color: #ff7f50;
    font-size: 1.4rem;
}

.conditions-category {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(30, 58, 138, 0.05);
    border-radius: 8px;
    border-left: 4px solid #ff7f50;
}

.conditions-category h3 {
    margin-top: 0;
    color: #ff7f50;
}

@media (max-width: 768px) {
    .regulations-content {
        padding: 0 1rem;
    }
    
    .regulations-container h1 {
        font-size: 2rem;
    }
    
    .regulation-section {
        padding: 1.5rem;
    }
    
    .points-grid {
        grid-template-columns: 1fr;
    }
    
    .vehicle-specs {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        font-size: 0.9rem;
        gap: 0.5rem;
    }
    
    .hero {
        height: 40vh;
    }
    
    .hero-overlay h1 {
        font-size: 1.5rem;
    }
    
    .regulations-container h1 {
        font-size: 1.8rem;
    }
    
    .regulation-section h2 {
        font-size: 1.5rem;
    }
}

/* Register Button */
.register-btn {
    background: linear-gradient(135deg, #ff6b35, #e55a2b) !important;
    color: white !important;
    padding: 0.5rem 1.5rem !important;
    border-radius: 25px !important;
    border: none !important;
    font-weight: bold !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    display: inline-block !important;
    text-align: center !important;
    border-bottom: none !important;
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.3) !important;
    vertical-align: middle !important;
}

.register-btn:hover {
    background: linear-gradient(135deg, #e55a2b, #d14d1f) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.5) !important;
    color: white !important;
}

/* Registration Modal Styles for Webbo Theme */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 58, 138, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #ffffff;
    border: 2px solid #ff7f50;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(255, 127, 80, 0.3);
    position: relative;
}

.close {
    color: #999;
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
    transition: color 0.3s;
}

.close:hover {
    color: #ff7f50;
}

.modal-content h2 {
    color: #1e3a8a;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    border-bottom: 2px solid #ff7f50;
    padding-bottom: 0.5rem;
}

.modal-content p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #1e3a8a;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: 'Formula1', Arial, sans-serif;
    background: white;
    color: #1e3a8a;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff7f50;
    box-shadow: 0 0 0 3px rgba(255, 127, 80, 0.1);
}

.submit-btn {
    background: linear-gradient(135deg, #ff7f50, #ff6347);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-family: 'Formula1', Arial, sans-serif;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #ff6347, #ff4500);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 127, 80, 0.4);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.status-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    display: none;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-message.loading {
    background: rgba(255, 127, 80, 0.1);
    color: #ff7f50;
    border: 1px solid #ff7f50;
}

/* Mobile Modal Adjustments for Webbo */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
        width: 95%;
    }
    
    .nav-menu .register-btn {
        margin-top: 1rem;
        display: inline-block !important;
        text-align: center;
        width: auto;
    }
}