@import url('https://fonts.googleapis.com/css2?family=Syncopate:wght@400;700&family=Space+Grotesk:wght@300;500;700&display=swap');

:root {
    /* Muted Jupiter-inspired color palette */
    --jupiter-dark-brown: #1a1208;
    --jupiter-medium-brown: #3d2817;
    --jupiter-warm-tan: #8b6f47;
    --jupiter-soft-cream: #c9b899;
    --jupiter-light-cream: #e8dcc8;
    --jupiter-rust: #8b5a3c;
    --jupiter-deep-orange: #a0522d;
    --shadow-dark: rgba(0, 0, 0, 0.5);
}

/* --- IFRAME SETUP --- */
#bg-frame {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    border: none; z-index: -1; pointer-events: none; 
}

/* --- LAYOUT: LEFT SIDE --- */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    color: var(--jupiter-light-cream);
    font-family: 'Space Grotesk', sans-serif;
    
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 2vh 8%;
    box-sizing: border-box;
}

/* Height-based responsive adjustments */
@media (max-height: 900px) {
    body {
        padding: 1.5vh 8%;
    }
}

@media (max-height: 800px) {
    body {
        padding: 1vh 6%;
        align-items: flex-start;
    }
}

@media (max-height: 700px) {
    body {
        padding: 1vh 5%;
    }
}

/* --- FORM STYLING --- */
form {
    background: rgba(26, 18, 8, 0.92); 
    border: 1px solid var(--jupiter-warm-tan);
    border-radius: 12px;
    padding: 2vh 2vw;
    
    width: 100%;
    max-width: 600px;
    
    box-shadow: 0 8px 32px var(--shadow-dark), 
                inset 0 1px 0 rgba(201, 184, 153, 0.1);
}

/* Height-based responsive padding */
@media (max-height: 900px) {
    form {
        padding: 1.8vh 2vw;
    }
}

@media (max-height: 800px) {
    form {
        padding: 1.5vh 1.8vw;
    }
}

@media (max-height: 700px) {
    form {
        padding: 1.2vh 1.5vw;
    }
}

@media (max-height: 600px) {
    form {
        padding: 0.8vh 1.2vw;
    }
}

@media (max-width: 768px) {
    form {
        padding: 2vh 4vw;
    }
}

h1 {
    font-family: 'Syncopate', sans-serif;
    font-weight: 700;
    text-align: center;
    background: linear-gradient(to right, var(--plasma-cyan), var(--void-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

fieldset {
    border: 1px solid var(--jupiter-rust);
    background: rgba(61, 40, 23, 0.3);
    margin-bottom: 1.8vh;
    padding: 1.5vh 1.2vw;
    border-radius: 8px;
}

/* Height-based spacing adjustments */
@media (max-height: 900px) {
    fieldset {
        margin-bottom: 1.5vh;
        padding: 1.3vh 1.2vw;
    }
}

@media (max-height: 800px) {
    fieldset {
        margin-bottom: 1.2vh;
        padding: 1.1vh 1vw;
    }
}

@media (max-height: 700px) {
    fieldset {
        margin-bottom: 1vh;
        padding: 0.9vh 0.8vw;
    }
}

@media (max-height: 600px) {
    fieldset {
        margin-bottom: 0.7vh;
        padding: 0.6vh 0.8vw;
    }
}

legend {
    background: var(--jupiter-rust);
    color: var(--jupiter-light-cream);
    padding: 0.5vh 0.9vw;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 4px;
}

@media (max-height: 800px) {
    legend {
        font-size: 0.7rem;
        padding: 0.4vh 0.8vw;
    }
}

@media (max-height: 700px) {
    legend {
        font-size: 0.68rem;
        padding: 0.4vh 0.7vw;
        letter-spacing: 1px;
    }
}

@media (max-height: 600px) {
    legend {
        font-size: 0.65rem;
        padding: 0.3vh 0.6vw;
    }
}

/* INPUTS */
input, select, textarea {
    border: none;
    border-bottom: 1px solid var(--jupiter-warm-tan);
    background: rgba(61, 40, 23, 0.4);
    color: var(--jupiter-light-cream);
    padding: 0.6vh 0.5vw;
    margin-top: 0.6vh;
    margin-bottom: 0.9vh;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    width: 100%; 
    box-sizing: border-box;
    display: block;
    transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    background: rgba(61, 40, 23, 0.6);
    border-bottom: 1px solid var(--jupiter-soft-cream);
    box-shadow: 0 2px 8px rgba(139, 111, 71, 0.2);
}

input::placeholder {
    color: rgba(201, 184, 153, 0.5);
}

label {
    font-size: 0.88rem;
    color: var(--jupiter-soft-cream);
    display: block;
    margin-bottom: 0.4vh;
    font-weight: 500;
}

/* Specific input type styling */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"] {
    min-height: 3.5vh;
}

/* Height-based adjustments for inputs */
@media (max-height: 900px) {
    input, select, textarea {
        padding: 0.55vh 0.5vw;
        margin-top: 0.55vh;
        margin-bottom: 0.85vh;
        font-size: 0.88rem;
    }
    
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="number"] {
        min-height: 3.2vh;
    }
}

@media (max-height: 800px) {
    input, select, textarea {
        padding: 0.5vh 0.5vw;
        margin-top: 0.5vh;
        margin-bottom: 0.75vh;
        font-size: 0.86rem;
    }
    
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="number"] {
        min-height: 3vh;
    }
    
    label {
        font-size: 0.86rem;
        margin-bottom: 0.35vh;
    }
}

@media (max-height: 700px) {
    input, select, textarea {
        padding: 0.45vh 0.45vw;
        margin-top: 0.45vh;
        margin-bottom: 0.65vh;
        font-size: 0.82rem;
    }
    
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="number"] {
        min-height: 2.8vh;
    }
    
    label {
        font-size: 0.82rem;
        margin-bottom: 0.3vh;
    }
}

@media (max-height: 600px) {
    input, select, textarea {
        padding: 0.4vh 0.4vw;
        margin-top: 0.4vh;
        margin-bottom: 0.55vh;
        font-size: 0.78rem;
    }
    
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="number"] {
        min-height: 2.5vh;
    }
    
    label {
        font-size: 0.78rem;
        margin-bottom: 0.25vh;
    }
}

input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    margin-top: 0;
    margin-bottom: 0;
    cursor: pointer;
}

textarea {
    resize: vertical;
    min-height: 6.5vh;
}

@media (max-height: 900px) {
    textarea {
        min-height: 6vh;
    }
}

@media (max-height: 800px) {
    textarea {
        min-height: 5.5vh;
    }
}

@media (max-height: 700px) {
    textarea {
        min-height: 5vh;
    }
}

@media (max-height: 600px) {
    textarea {
        min-height: 4.5vh;
    }
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23c9b899' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 35px;
}

select option {
    background: var(--jupiter-dark-brown);
    color: var(--jupiter-light-cream);
}

/* Checkbox container styling */
fieldset div {
    display: flex;
    align-items: center;
    margin-top: 1vh;
    margin-bottom: 0.6vh;
}

fieldset div label {
    margin-bottom: 0;
    cursor: pointer;
}

@media (max-height: 800px) {
    fieldset div {
        margin-top: 0.8vh;
        margin-bottom: 0.5vh;
    }
}

@media (max-height: 700px) {
    fieldset div {
        margin-top: 0.7vh;
        margin-bottom: 0.4vh;
    }
}

@media (max-height: 600px) {
    fieldset div {
        margin-top: 0.6vh;
        margin-bottom: 0.3vh;
    }
}

/* BUTTONS WITH SOPHISTICATED EFFECTS */
button[type="submit"] {
    position: relative;
    background: linear-gradient(135deg, var(--jupiter-rust), var(--jupiter-deep-orange));
    border: none;
    border-radius: 6px;
    color: var(--jupiter-light-cream);
    padding: 1.3vh 1.8vw;
    font-family: 'Syncopate', sans-serif;
    font-weight: bold;
    font-size: 0.82rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    width: 100%;
    margin-top: 1.5vh;
    margin-bottom: 0.8vh;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ripple effect layer */
button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(232, 220, 200, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 90, 60, 0.4);
    background: linear-gradient(135deg, var(--jupiter-deep-orange), var(--jupiter-warm-tan));
}

button[type="submit"]:hover::before {
    width: 300px;
    height: 300px;
}

button[type="submit"]:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

button[type="submit"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 111, 71, 0.4);
}

/* Reset button with elegant hover effect */
button[type="reset"] {
    position: relative;
    background: transparent;
    border: 1px solid var(--jupiter-warm-tan);
    color: var(--jupiter-soft-cream);
    margin-top: 0.8vh;
    padding: 1vh 1.8vw;
    cursor: pointer;
    width: 100%;
    border-radius: 6px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    overflow: hidden;
    transition: all 0.3s ease;
}

button[type="reset"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(139, 111, 71, 0.2);
    transition: left 0.3s ease;
    z-index: -1;
}

button[type="reset"]:hover {
    border-color: var(--jupiter-soft-cream);
    color: var(--jupiter-light-cream);
}

button[type="reset"]:hover::before {
    left: 0;
}

button[type="reset"]:active {
    transform: scale(0.98);
}

button[type="reset"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 111, 71, 0.3);
}

/* Height-based button adjustments */
@media (max-height: 900px) {
    button[type="submit"] {
        padding: 1.2vh 1.8vw;
        margin-top: 1.3vh;
        margin-bottom: 0.7vh;
        font-size: 0.8rem;
    }
    
    button[type="reset"] {
        padding: 0.95vh 1.8vw;
        margin-top: 0.7vh;
    }
}

@media (max-height: 800px) {
    button[type="submit"] {
        padding: 1.1vh 1.6vw;
        margin-top: 1.2vh;
        margin-bottom: 0.6vh;
        font-size: 0.78rem;
    }
    
    button[type="reset"] {
        padding: 0.9vh 1.6vw;
        margin-top: 0.6vh;
        font-size: 0.82rem;
    }
}

@media (max-height: 700px) {
    button[type="submit"] {
        padding: 0.95vh 1.4vw;
        margin-top: 1vh;
        margin-bottom: 0.5vh;
        font-size: 0.74rem;
        letter-spacing: 1.5px;
    }
    
    button[type="reset"] {
        padding: 0.8vh 1.4vw;
        margin-top: 0.5vh;
        font-size: 0.78rem;
    }
}

@media (max-height: 600px) {
    button[type="submit"] {
        padding: 0.8vh 1.2vw;
        margin-top: 0.8vh;
        margin-bottom: 0.4vh;
        font-size: 0.7rem;
        letter-spacing: 1px;
    }
    
    button[type="reset"] {
        padding: 0.7vh 1.2vw;
        margin-top: 0.4vh;
        font-size: 0.74rem;
    }
}