/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Raleway', sans-serif;
    color: #ffffff;
    overflow-x: hidden;
}

body {
    background: #1a1a1a;
    position: relative;
    min-height: 100vh;
}

/* Background wrapper for team/about pages */
.page-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: url('../images/bkg.png') center center no-repeat;
    background-size: cover;
    filter: brightness(0.85);
}

.page-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, 
        rgba(20, 30, 40, 0.1) 0%, 
        rgba(20, 30, 40, 0.3) 60%, 
        rgba(20, 30, 40, 0.7) 100%);
}

/* Logo */
#logo {
    display: block;
    margin: 50px auto 40px auto;
    max-width: 250px;
    height: auto;
}

/* Main Content Box */
.main-box {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto 50px auto;
    background-color: rgba(35, 50, 65, 0.95);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

/* Border frame overlay */
.border-frame {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
    background: 
        url("../images/corner_t_left.png") top left no-repeat,
        url("../images/corner_t_right.png") top right no-repeat,
        url("../images/corner_b_left.png") bottom left no-repeat,
        url("../images/corner_b_right.png") bottom right no-repeat,
        url("../images/border_w.png") top center repeat-x,
        url("../images/border_w.png") bottom center repeat-x,
        url("../images/border_h.png") left center repeat-y,
        url("../images/border_h.png") right center repeat-y;
    filter: grayscale(100%) brightness(0.7);
}

/* Content inside the box */
.content {
    position: relative;
    z-index: 5;
    padding: 60px 80px;
}

h1 {
    font-size: 3em;
    font-weight: 800;
    text-align: center;
    margin-bottom: 35px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
}

.intro-text {
    background-color: rgba(25, 35, 45, 0.6);
    padding: 30px 40px;
    border-radius: 6px;
    margin: 0 auto 40px auto;
    text-align: center;
    line-height: 1.8;
    color: #e5e5e5;
    font-size: 1.1em;
    max-width: 900px;
}

.intro-text a {
    color: #4db8ff;
    text-decoration: none;
    font-weight: bold;
}

.intro-text a:hover {
    text-decoration: underline;
}

/* Section Headers */
.section-title {
    font-size: 1.4em;
    font-weight: bold;
    color: #4db8ff;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 35px 0 20px 0;
    text-align: center;
}

/* Button Grid */
.button-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.role-btn {
    width: 220px;
    height: 70px;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    color: #ffffff;
    background-color: rgba(40, 55, 70, 0.8);
    border: 2px solid rgba(80, 80, 80, 0.4);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.role-btn:hover {
    background-color: rgba(50, 65, 80, 0.9);
    border-color: rgba(100, 100, 100, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.4);
}

.role-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Footer text */
.footer-text {
    text-align: center;
    margin-top: 40px;
    color: #a0a0a0;
    font-size: 1.05em;
    font-style: italic;
}

/* Hidden application forms */
.app-form-container {
    display: none;
    width: 95%;
    max-width: 1200px;
    margin: 0 auto 50px auto;
}

.app-form-box {
    background-color: rgba(35, 50, 65, 0.95);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.form-content {
    position: relative;
    z-index: 5;
    padding: 40px;
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.form-header h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #ffffff;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
}

.back-btn {
    position: absolute;
    top: 0;
    right: 0;
    padding: 8px 16px;
    background-color: rgba(60, 60, 60, 0.6);
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.back-btn:hover {
    background-color: rgba(80, 80, 80, 0.7);
}

.alert-box {
    background-color: rgba(25, 35, 45, 0.7);
    border: 1px solid rgba(80, 80, 80, 0.4);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 25px;
}

.alert-box strong {
    color: #4db8ff;
}

/* Form fields */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #e0e0e0;
}

h3 {
    font-size: 1.3em;
    color: #4db8ff;
    margin: 30px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(77, 184, 255, 0.3);
}

.input-wrapper {
    display: flex;
}

.input-icon {
    background-color: rgba(50, 65, 80, 0.6);
    border: 1px solid rgba(80, 80, 80, 0.4);
    border-right: none;
    padding: 10px 14px;
    border-radius: 4px 0 0 4px;
    color: #a0a0a0;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    color: #ffffff;
    background-color: rgba(30, 40, 50, 0.8);
    border: 1px solid rgba(80, 80, 80, 0.4);
    border-radius: 4px;
    transition: all 0.2s ease;
    font-family: 'Raleway', sans-serif;
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

.form-input:focus {
    outline: none;
    border-color: #4db8ff;
    background-color: rgba(35, 45, 55, 0.9);
    box-shadow: 0 0 8px rgba(77, 184, 255, 0.3);
}

.form-input::placeholder {
    color: #808080;
    opacity: 1;
}

/* Style select dropdowns */
select.form-input {
    cursor: pointer;
}

select.form-input option {
    background-color: #2a3540;
    color: #ffffff;
}

.submit-btn {
    display: block;
    margin: 30px auto 0 auto;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    background-color: #4db8ff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.submit-btn:hover {
    background-color: #3da8ef;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Lego-style Page Transitions */
nav {
    transform: translateY(-100px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

#logo {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.main-box,
.hero-section {
    transform: translateY(100px) scale(0.8);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.hero-content > * {
    transform: translateX(-50px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.features-grid .feature-card {
    transform: scale(0) rotate(10deg);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Loaded state - everything snaps together */
body.loaded nav {
    transform: translateY(0);
    opacity: 1;
}

body.loaded #logo {
    transform: scale(1) rotate(0);
    opacity: 1;
    transition-delay: 0.2s;
}

body.loaded .main-box,
body.loaded .hero-section {
    transform: translateY(0) scale(1);
    opacity: 1;
    transition-delay: 0.4s;
}

body.loaded .hero-content > * {
    transform: translateX(0);
    opacity: 1;
}

body.loaded .hero-content > *:nth-child(1) { transition-delay: 0.5s; }
body.loaded .hero-content > *:nth-child(2) { transition-delay: 0.6s; }
body.loaded .hero-content > *:nth-child(3) { transition-delay: 0.7s; }
body.loaded .hero-content > *:nth-child(4) { transition-delay: 0.8s; }
body.loaded .hero-content > *:nth-child(5) { transition-delay: 0.9s; }

body.loaded .features-grid .feature-card {
    transform: scale(1) rotate(0);
    opacity: 1;
}

body.loaded .feature-card:nth-child(1) { transition-delay: 0.6s; }
body.loaded .feature-card:nth-child(2) { transition-delay: 0.7s; }
body.loaded .feature-card:nth-child(3) { transition-delay: 0.8s; }
body.loaded .feature-card:nth-child(4) { transition-delay: 0.9s; }
body.loaded .feature-card:nth-child(5) { transition-delay: 1.0s; }
body.loaded .feature-card:nth-child(6) { transition-delay: 1.1s; }

/* Exit animations */
body.exiting nav {
    transform: translateY(-100px);
    opacity: 0;
    transition-delay: 0s;
}

body.exiting #logo {
    transform: scale(0) rotate(180deg);
    opacity: 0;
    transition-delay: 0.1s;
}

body.exiting .main-box,
body.exiting .hero-section {
    transform: translateY(100px) scale(0.8);
    opacity: 0;
    transition-delay: 0.2s;
}

/* Responsive */
@media (max-width: 768px) {
    .content {
        padding: 25px;
    }
    
    .role-btn {
        width: 150px;
        height: 45px;
        font-size: 12px;
    }
    
    h1 {
        font-size: 1.8em;
    }
}

/* Add this to your styles.css to improve transitions */

/* Prevent initial flash */
body {
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.loaded {
    opacity: 1;
}

/* Faster, smoother transitions */
nav {
    transform: translateY(-100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Smoother easing */
}

#logo {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-box,
.hero-section {
    transform: translateY(50px) scale(0.95); /* Less dramatic transform */
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loaded state */
body.loaded nav {
    transform: translateY(0);
    opacity: 1;
}

body.loaded #logo {
    transform: scale(1) rotate(0);
    opacity: 1;
    transition-delay: 0.1s;
}

body.loaded .main-box,
body.loaded .hero-section {
    transform: translateY(0) scale(1);
    opacity: 1;
    transition-delay: 0.2s;
}

/* Exit animations - faster */
body.exiting {
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.exiting nav {
    transform: translateY(-50px); /* Less movement */
    opacity: 0;
    transition-delay: 0s;
}

body.exiting #logo {
    transform: scale(0.9) rotate(90deg); /* Less rotation */
    opacity: 0;
    transition-delay: 0s;
}

body.exiting .main-box,
body.exiting .hero-section {
    transform: translateY(50px) scale(0.95);
    opacity: 0;
    transition-delay: 0s;
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}