@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    font-family: 'Poppins', sans-serif;
}

html {
    font-size: 62.5%;
}

body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    background-color: black;
    color: white;
}

header {
    margin-top: 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 9%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo img {
    height: 50px;
    cursor: pointer;
    transition: 0.5s ease;
}

.logo img:hover {
    transform: scale(1.1);
}

nav a {
    font-size: 1.8rem;
    color: white;
    margin-left: 4rem;
    font-weight: 500;
    transition: 0.3s ease;
    border-bottom: 3px solid transparent;
}

nav a:first-child {
    margin-left: 0;
}

nav a:hover,
nav a.active {
    color: #f06363;
    border-bottom: 3px solid #f06363;
}

nav {
    display: flex;
    align-items: center;
}

section {
    min-height: 100vh;
    padding: 12rem 9% 5rem;
}

.home {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8rem;
}

.home .home-content h1 {
    font-size: 6rem;
    font-weight: 700;
    line-height: 1.3;
}

span {
    color: #f06363;
}

.home-content h3 {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.home-content p {
    font-size: 1.6rem;
    max-width: 600px;
    line-height: 1.6;
}

.home-img img {
    width: 32vw; 
    filter: drop-shadow(0 0 25px #f06363);
    transition: 0.2s linear;
}

.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background-color: transparent;
    border: 0.2rem solid #f06363;
    font-size: 2rem;
    border-radius: 50%;
    margin: 3rem 1.5rem 3rem 0;
    transition: 0.3s ease;
    color: #f06363;
    position: relative;
}

.social-icons a:hover {
    color: black;
    transform: scale(1.3) translateY(-5px);
    background-color: #f06363;
    box-shadow: 0 0 25px #f06363;
}

.social-icons a::after {
    content: attr(data-tooltip);
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #f06363;
    color: black;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 0.5rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s ease;
}

.social-icons a:hover::after {
    opacity: 1;
    top: -40px;
}

.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background-color: black;
    border-radius: 4rem;
    font-size: 1.6rem;
    color: #f06363;
    letter-spacing: 0.3rem;
    font-weight: 600;
    border: 2px solid #f06363;
    transition: 0.3s ease;
    cursor: pointer;
    margin-top: 2rem;
}

.btn:hover {
    transform: scale3d(1.03, 1.03, 1.03);
    background-color: #f06363;
    color: black;
    box-shadow: 0 0 25px #f06363;
}

.typing-text{
    font-size: 34px;
    font-weight: 600;
    min-width: 280px;
}

.typing-text span{
    position: relative;
}

.typing-text span::before{
    content: "software Developer";
    color: #f06363;
    animation: words 20s infinite;
}

.typing-text span::after{
    content: "";
    background-color: black;
    position: absolute;
    width: calc(100% + 8px);
    height: 100%;
    border-left: 3px solid black;
    right: -8;
    animation: cursor 0.6s infinite;
}

@keyframes cursor{
    to{
        border-left: 3px solid #f06363;
    }
}

@keyframes words {
    0%, 1% { content: "A"; }
    1%, 2% { content: "Af"; }
    2%, 3% { content: "Aff"; }
    3%, 4% { content: "Affi"; }
    4%, 5% { content: "Affil"; }
    5%, 6% { content: "Affili"; }
    6%, 7% { content: "Affilia"; }
    7%, 8% { content: "Affiliat"; }
    8%, 9% { content: "Affiliate"; }
    9%, 10% { content: "Affiliate "; }
    10%, 11% { content: "Affiliate C"; }
    11%, 12% { content: "Affiliate Co"; }
    12%, 13% { content: "Affiliate Cod"; }
    13%, 14% { content: "Affiliate Code"; }
    14%, 33.33% { content: "Affiliate Codes"; } 

    33.33%, 34.33% { content: "S"; }
    34.33%, 35.33% { content: "Sa"; }
    35.33%, 36.33% { content: "Sal"; }
    36.33%, 37.33% { content: "Sale"; }
    37.33%, 38.33% { content: "Sales"; }
    38.33%, 39.33% { content: "Sales "; }
    39.33%, 40.33% { content: "Sales C"; }
    40.33%, 41.33% { content: "Sales Cu"; }
    41.33%, 42.33% { content: "Sales Cut"; }
    42.33%, 66.66% { content: "Sales Cuts"; } 

    66.66%, 67.66% { content: "D"; }
    67.66%, 68.66% { content: "Di"; }
    68.66%, 69.66% { content: "Dis"; }
    69.66%, 70.66% { content: "Disc"; }
    70.66%, 71.66% { content: "Disco"; }
    71.66%, 72.66% { content: "Discou"; }
    72.66%, 73.66% { content: "Discoun"; }
    73.66%, 74.66% { content: "Discount"; }
    74.66%, 100% { content: "Discounts"; } 
}

.page-title {
    font-size: 5rem;
    text-align: center;
    margin-bottom: 5rem;
}

.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    justify-content: center;
}

.card {
    background: #111;
    border: 1px solid var(--card-color, #f06363);
    border-radius: 1.5rem;
    padding: 3rem;
    width: 300px;
    text-align: center;
    box-shadow: 0 0 10px var(--card-shadow, rgba(240, 99, 99, 0.2));
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.4s ease;
}

.card h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--card-color, #f06363);
}

.card-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.card p {
    font-size: 1.4rem;
    flex-grow: 1;
}

.card .btn {
    color: var(--card-color, #f06363);
    border-color: var(--card-color, #f06363);
}

.card .btn:hover {
    background-color: var(--card-color, #f06363);
    color: black;
    box-shadow: 0 0 25px var(--card-color, #f06363);
}

.card:hover {
    transform: translateY(-10px);
    background-color: var(--card-color, #f06363);
    box-shadow: 0 10px 25px var(--card-shadow, rgba(240, 99, 99, 0.4));
}

.card:hover h3, 
.card:hover p {
    color: #111 !important;
}

.card:hover .btn {
    background-color: #111;
    color: var(--card-color, #f06363);
    border-color: #111;
}

.card:hover .btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

.photo-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 5rem;
}

.photo-gallery img {
    width: 400px;
    height: 225px; 
    max-width: 100%;
    object-fit: cover;
    border-radius: 1.5rem;
    border: 2px solid #f06363;
    box-shadow: 0 0 10px rgba(240, 99, 99, 0.2);
    transition: 0.3s ease;
}

.photo-gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px #f06363;
}

.review-box {
    background: #161616;
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
    border-left: 4px solid #f06363;
}

.review-author {
    font-size: 1.8rem;
    font-weight: bold;
    color: #f06363;
    margin-bottom: 0.5rem;
}

.review-text {
    font-size: 1.5rem;
}

.delete-btn {
    background: #ff3333;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1.2rem;
    margin-top: 1rem;
    display: none; 
}

.discord-login {
    background-color: #5865F2;
    color: white;
    padding: 1rem 2rem;
    font-size: 1.6rem;
    border-radius: 0.5rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
}

/* Custom Notification Styles */
.notification-container {
    position: fixed;
    top: 100px; /* Below header */
    right: 2rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notification {
    background: #1a1a1a;
    color: white;
    padding: 1.5rem;
    border-radius: 0.8rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    min-width: 320px;
    max-width: 320px;
    position: relative;
    overflow: hidden;
    border-left: 5px solid #51d87a; /* Success color from affiliates */
}

.notification.error {
    border-left-color: #f06363; /* This page's theme color */
}

.notification-timer {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background-color: #51d87a; /* Green for success timer */
    animation: shrink 5s linear forwards;
}

@keyframes shrink {
    from { width: 100%; }
    to { width: 0%; }
}

/* Livery Submission Popup Styles */
.livery-form-container {
    background: #111;
    padding: 4rem;
    border-radius: 1.5rem;
    border: 1px solid #f06363;
    max-width: 900px;
    width: 90%;
    margin: 0 auto;
    box-shadow: 0 0 25px rgba(240, 99, 99, 0.2);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-section-title {
    font-size: 1.8rem;
    color: #f06363;
    margin-bottom: 0.5rem;
    text-align: left;
}

.livery-form-container input[type="text"],
.livery-form-container textarea,
.livery-form-container select {
    width: 100%;
    padding: 1rem;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 0.5rem;
    color: white;
    font-size: 1.4rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s ease;
}

.livery-form-container input[type="text"]:focus,
.livery-form-container textarea:focus,
.livery-form-container select:focus {
    border-color: #f06363;
    outline: none;
}

.livery-form-container textarea {
    min-height: 100px;
    resize: vertical;
}

/* Navbar Dropdown */
.navbar-dropdown {
    position: relative;
    display: inline-block;
    margin-left: 4rem;
}

.navbar-dropdown::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 1.5rem; /* This is the bridge height */
    background-color: transparent;
}

.navbar-dropdown-content {
    display: none;
    position: absolute;
    background-color: #111;
    min-width: 260px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
    z-index: 1;
    border-radius: 0.5rem;
    border: 1px solid #333;
    padding: 0.5rem 0;
    margin-top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
}

.navbar-dropdown-content a {
    color: white;
    padding: 1.2rem 2rem;
    text-decoration: none;
    display: block;
    font-size: 1.6rem;
    margin-left: 0 !important;
    border-bottom: none !important;
    transition: background-color 0.2s ease;
    font-weight: 500;
    text-align: left;
}

/* Reset margin for the dropdown trigger link, as the container gets the margin */
.navbar-dropdown > a {
    margin-left: 0;
}

.navbar-dropdown-content a:hover {
    background-color: #222;
    color: #f06363;
}

/* Responsive Navbar */
.nav-item-ads,
    .nav-item-resources,
    .nav-item-devs,
    .nav-item-about {
        display: inline-block;
    }

.nav-dropdown-container {
    position: relative;
    display: none; /* Hidden on desktop, shown on mobile */
    margin-left: 2rem;
}

.nav-more-arrow {
    font-size: 2.4rem;
    color: white;
    padding: 0.5rem;
    border-bottom: 3px solid transparent;
    cursor: pointer;
}

.nav-dropdown-content {
    display: none; /* Toggled by JS */
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 1.5rem;
    background-color: #111;
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
    z-index: 1;
    border-radius: 0.5rem;
    border: 1px solid #333;
    padding: 0.5rem 0;
    overflow: hidden;
}

.nav-dropdown-content a {
    display: none;
    color: white;
    padding: 1.2rem 2rem;
    font-size: 1.6rem;
    margin-left: 0;
    border-bottom: none;
    transition: background-color 0.2s ease;
    font-weight: 500;
}

.nav-dropdown-content a:hover,
.nav-dropdown-content a.active {
    background-color: #222;
    border-bottom: none;
    color: #f06363;
}

.navbar-dropdown:hover .navbar-dropdown-content {
    display: block;
}

.navbar-dropdown:hover > a,
.navbar-dropdown > a.active {
    color: #f06363;
    border-bottom-color: #f06363;
}

@media (max-width: 1250px) {
    nav .nav-item-resources { display: none; }
    .nav-dropdown-container { display: inline-block; }
    .nav-dropdown-content a[href*="resources.html"] { display: block; }
}

@media (max-width: 1150px) {
    nav .nav-item-about { display: none; }
    .nav-dropdown-content a[href*="about.html"] { display: block; }
}

@media (max-width: 1024px) {
    nav .nav-item-devs { display: none; }
    .nav-dropdown-content a[href*="developers.html"] { display: block; }
}

@media (max-width: 920px) {
    nav .nav-item-ads { display: none; }
    .nav-dropdown-content a[href*="ads.html"] { display: block; }
}

@media (max-width: 820px) {
    nav .nav-item-affiliates { display: none; }
    .nav-dropdown-content a[href*="affiliates.html"] { display: block; }
}

@media (max-width: 750px) {
    nav .nav-item-store { display: none; }
    .nav-dropdown-content a[href*="store.html"] { display: block; }
}

footer {
    background-color: #050505;
    padding: 5rem 9% 0;
    border-top: 1px solid #222;
    overflow-x: hidden;
}

.footer-top-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 4rem;
    margin-bottom: 5rem;
}

.footer-logo img {
    width: 80px;
    height: auto;
}

.footer-links-container {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 2.5rem;
}

.footer-column {
    min-width: 160px;
}

.footer-column h3 {
    font-size: 2rem;
    color: white;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
    font-weight: 600;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: #ffa44b;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 1.2rem;
}

.footer-column ul li a {
    font-size: 1.5rem;
    color: #a0aabf;
    transition: all 0.3s ease;
    border-bottom: none;
    margin-left: 0;
}

.footer-column ul li a:hover {
    color: #ffa44b;
    padding-left: 5px;
    border-bottom: none;
}

.footer-column ul li a[href*="aeropro.html"]:hover { color: #788fff; }
.footer-column ul li a[href*="aeroprogold.html"]:hover { color: #ffe553; }
.footer-column ul li a[href*="courses.html"]:hover { color: #48d1cc; }
.footer-column ul li a[href*="staff/login.html"]:hover { color: #ff65f2; }
.footer-column ul li a[href*="discord.gg"]:hover { color: #5865F2; }

.footer-banner {
    text-align: center;
    padding-top: 4rem;
}

.footer-banner img {
    max-width: 800px;
    width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    .footer-top-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-links-container {
        justify-content: center;
        width: 100%;
    }
    .footer-column h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

.footer-left {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
}

@media (max-width: 768px) {
    .footer-left {
        flex-direction: column;
        align-items: center;
    }
}

.footer-settings {
    padding-top: 1rem;
}

.footer-settings h3 {
    font-size: 1.4rem;
    color: #a0aabf;
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-align: left;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #1a1a1a;
    border: 1px solid #333;
    transition: .4s;
    border-radius: 34px;
}

.switch-icon-container {
    position: absolute;
    height: 26px;
    width: 26px;
    left: 3px;
    bottom: 3px;
    background-color: #a0aabf;
    transition: .4s;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #1a1a1a;
    font-size: 1.4rem;
}

.theme-switch input:checked + .switch-slider .switch-icon-container {
    transform: translateX(26px);
}

.switch-slider .fa-sun { display: none; }
.theme-switch input:checked + .switch-slider .fa-moon { display: none; }
.theme-switch input:checked + .switch-slider .fa-sun { display: block; }

body.light-theme {
    background-color: white;
    color: black;
}

body.light-theme header {
    background-color: rgba(255, 255, 255, 0.8);
}

body.light-theme nav a,
body.light-theme .nav-more-arrow {
    color: black;
}

body.light-theme .switch-slider {
    background-color: #f0f0f0;
    border-color: #dcdcdc;
}

body.light-theme .switch-icon-container {
    background-color: #555;
    color: #f0f0f0;
}

body.light-theme input:checked + .switch-slider .switch-icon-container {
    background-color: #a0aabf;
    color: #1a1a1a;
}

body.light-theme .card {
    background: white;
    border-color: var(--card-color, #f06363);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

body.light-theme .card:hover h3,
body.light-theme .card:hover p {
    color: #111 !important;
}

body.light-theme .navbar-dropdown-content,
body.light-theme .nav-dropdown-content {
    background-color: white;
    border-color: #e0e0e0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

body.light-theme .navbar-dropdown-content a,
body.light-theme .nav-dropdown-content a {
    color: #1a1a1a;
}

body.light-theme .navbar-dropdown-content a:hover,
body.light-theme .nav-dropdown-content a:hover {
    background-color: #f5f5f5;
}

body.light-theme footer {
    background-color: white;
    border-top-color: #e0e0e0;
}

body.light-theme .footer-column h3,
body.light-theme .footer-settings h3 {
    color: black;
}

body.light-theme .footer-column ul li a {
    color: #555;
}