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

/* Basic styling */
html, body {
    font-family: 'Share Tech Mono', monospace;
}

body {
    background-color: black;
    color: #3C0177;
}

/* Light mode overrides */
body.light-mode {
    background-color: white;
    color: #bd0000;
}

body.light-mode .fixed-background {
    background-color: white;
}

body.light-mode .contact-header,
body.light-mode .contact-content,
body.light-mode .seeking-knowledge,
body.light-mode .form-group label,
body.light-mode .footer,
body.light-mode .copyright,
body.light-mode .terms {
    color: #bd0000;
}

body.light-mode .title-image {
    content: url('../assets/wholelottared.png');
}

/* Form light mode styles */
body.light-mode .form-group input,
body.light-mode .form-group textarea {
    border: 1px solid #bd0000;
    color: black;
}

body.light-mode .form-group input:focus,
body.light-mode .form-group textarea:focus {
    outline: none;
    border-color: #bd0000;
    box-shadow: 0 0 5px rgba(189, 0, 0, 0.5);
}

body.light-mode .form-group input.has-content,
body.light-mode .form-group textarea.has-content {
    background-color: rgba(189, 0, 0, 0.1);
    border-color: #bd0000;
    color: black;
}

body.light-mode .form-group input.has-content:focus,
body.light-mode .form-group textarea.has-content:focus {
    background-color: rgba(189, 0, 0, 0.2);
}

body.light-mode .submit-button {
    border: 1px solid #bd0000;
    color: #bd0000;
}

body.light-mode .submit-button:hover {
    background-color: rgba(189, 0, 0, 0.1);
    border-color: #bd0000;
    color: #bd0000;
    text-shadow: 0 0 5px rgba(189, 0, 0, 0.3);
}

body.light-mode .form-message.success {
    color: #bd0000;
    background-color: rgba(189, 0, 0, 0.1);
    border: 1px solid #bd0000;
}

/* Fixed background layer */
.fixed-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    z-index: -1;
}

/* Critical mobile settings */
body.contact-view {
    margin: 0;
    padding: 0;
    width: 100%;
    background-color: black;
    min-height: 100%;
}

/* Desktop and tablet styles */
@media screen and (min-width: 601px) {
    html, body {
        height: auto;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .content-wrapper {
        position: static;
        min-height: 100vh;
    }
}

/* Mobile styles - let body scroll normally */
@media screen and (max-width: 600px) {
    body.contact-view {
        -webkit-overflow-scrolling: touch !important;
        overflow-y: auto;
    }
    
    .content-wrapper {
        position: static;
        min-height: 100vh;
    }
}

/* Header */
.title-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px 0;
    text-align: center;
    z-index: 25;
    pointer-events: none;
}

.title-image {
    max-width: 28.125rem;
    width: calc(48vw + 150px);
    height: auto;
    -webkit-filter: url(#titleWaveEffect);
    filter: url(#titleWaveEffect);
    transform: translate3d(0,0,0);
    will-change: transform;
    pointer-events: auto;
}

/* Main content */
.contact-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 180px;
    min-height: calc(100vh - 100px);
}

.contact-header {
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #3C0177;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
}

.contact-content {
    min-height: 30vh;
    color: #3C0177;
    margin-top: 30px;
}

/* Form styles */
.seeking-knowledge {
    margin-bottom: 30px;
    font-size: 1.4rem;
    font-weight: bold;
    color: #3C0177;
    letter-spacing: 1px;
    transition: transform 0.5s ease, text-shadow 0.5s ease;
    text-align: center;
}

.contact-form-container {
    margin-top: 30px;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #3C0177;
    font-size: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #3C0177;
    background: transparent;
    color: white;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.form-group textarea {
    resize: none;
}

/* Form input styles */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-text-fill-color: white !important;
    -webkit-box-shadow: 0 0 0 30px rgba(147, 51, 234, 0.25) inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

input:autofill {
    -webkit-text-fill-color: white;
    -webkit-box-shadow: 0 0 0 30px rgba(147, 51, 234, 0.25) inset;
    box-shadow: 0 0 0 30px rgba(147, 51, 234, 0.25) inset !important;
    color: white !important;
    background-color: rgba(147, 51, 234, 0.25) !important;
}

/* Focus state - just enhance the border */
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #9333EA;
    box-shadow: 0 0 5px rgba(147, 51, 234, 0.5);
}

/* When input has content - apply the purple background */
.form-group input.has-content,
.form-group textarea.has-content {
    background-color: rgba(147, 51, 234, 0.25);
    border-color: #9333EA;
    color: white;
}

/* When both focused and has content */
.form-group input.has-content:focus,
.form-group textarea.has-content:focus {
    background-color: rgba(147, 51, 234, 0.4);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0);
}

.submit-button {
    background: transparent;
    border: 1px solid #3C0177;
    color: #3C0177;
    padding: 10px 20px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.submit-button:hover {
    background-color: rgba(147, 51, 234, 0.1);
    border-color: #9333EA;
    color: #9333EA;
    transform: scale(1.05);
    text-shadow: 0 0 5px rgba(147, 51, 234, 0.3);
}

/* Form messages */
.form-message {
    padding: 15px;
    margin-top: 15px;
    border-radius: 4px;
    text-align: center;
    display: none;
}

.form-message.success {
    color: #3C0177;
    background-color: rgba(147, 51, 234, 0.1);
    border: 1px solid #9333EA;
}

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

/* Footer */
.footer {
    width: 100%;
    text-align: center;
    margin-top: 60px;
    margin-bottom: 40px;
    color: #3C0177;
}

.copyright {
    font-size: 12px;
    margin-bottom: 6px;
}

.terms {
    font-size: 12px;
    cursor: pointer;
}

/* Media queries */
@media screen and (min-width: 601px) {
    .contact-container {
        padding-top: 240px;
    }
    
    .title-image {
        max-width: 450px;
    }
    
    .title-container {
        margin-top: 15px;
    }
    
    .contact-content {
        min-height: 60vh;
    }
}

@media screen and (max-width: 600px) {
    .contact-container {
        padding: 0 40px;
        padding-top: 180px;
    }
    
    .footer {
        margin-top: 100px;
        margin-bottom: 100px;
        padding-bottom: 2.5rem;
    }
}

