/* --- BASE RESET & FONTS --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Space Grotesk', sans-serif;
}

:root {
    --bg-color: #f4f0ea; 
    --primary: #ffeb3b;  
    --accent: #ff4757;   
    --dark: #111111;     
}

body {
    background-color: var(--bg-color);
    color: var(--dark);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* --- SEAMLESS TICKER HEADER --- */
.info-ticker {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--dark);
    color: var(--primary);
    padding: 10px 0;
    overflow: hidden;
    border-bottom: 4px solid var(--dark);
    z-index: 100;
}

.ticker-track {
    display: flex;
    width: max-content; /* Allows track to be as wide as needed */
    animation: ticker 15s linear infinite;
}

.ticker-content {
    white-space: nowrap;
    font-weight: 900;
    font-size: 0.9rem;
    padding-right: 10px; /* Small gap before it repeats */
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* Moves exactly half the width to loop */
}

/* --- LAYOUT CONTAINER --- */
.container {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 50px; 
}

/* --- TYPOGRAPHY --- */
header {
    text-align: center;
}

.title {
    font-size: clamp(3rem, 10vw, 4.5rem);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -2px;
    text-shadow: 4px 4px 0px var(--primary), 8px 8px 0px var(--dark);
    margin-bottom: 10px;
}

.subtitle {
    font-weight: 700;
    font-size: 1.1rem;
    border: 2px solid var(--dark);
    display: inline-block;
    padding: 5px 15px;
    background: #fff;
    transform: rotate(-2deg);
}

/* --- THE MAIN CARD --- */
.card {
    background: #fff;
    border: 4px solid var(--dark);
    padding: 30px 20px;
    border-radius: 0px; 
    box-shadow: 8px 8px 0px var(--dark);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* --- INPUT FIELD --- */
input[type="url"] {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    border: 3px solid var(--dark);
    background: var(--bg-color);
    outline: none;
    transition: all 0.2s ease;
}

input[type="url"]:focus {
    background: #fff;
    box-shadow: 4px 4px 0px var(--accent);
}

/* --- RADIO BUTTONS (Used for both Format and Quality) --- */
.options-group {
    display: flex;
    gap: 15px;
}

.radio-btn {
    flex: 1;
    cursor: pointer;
}

.radio-btn input {
    display: none;
}

.custom-radio {
    display: block;
    text-align: center;
    padding: 12px;
    font-weight: 700;
    border: 3px solid var(--dark);
    background: #fff;
    transition: all 0.1s ease;
}

.radio-btn input:checked + .custom-radio {
    background: var(--primary);
    box-shadow: 4px 4px 0px var(--dark);
    transform: translate(-2px, -2px);
}

/* --- NEW: BRUTALIST QUALITY SELECTOR --- */
.quality-selector {
    border: 3px solid var(--dark);
    padding: 15px;
    background: #f4f0ea; /* Match body background */
    box-shadow: inset 4px 4px 0px rgba(0,0,0,0.05); /* Slight inset shadow to look recessed */
}

.quality-selector p {
    font-weight: 900;
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-align: center;
}

.quality-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2x2 Grid */
    gap: 10px;
}

/* Make quality buttons a bit smaller than format buttons */
.quality-grid .custom-radio {
    padding: 8px;
    font-size: 0.9rem;
}

/* --- MAIN BUTTON --- */
.brutal-btn {
    width: 100%;
    padding: 18px;
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    background: var(--accent);
    border: 4px solid var(--dark);
    cursor: pointer;
    box-shadow: 6px 6px 0px var(--dark);
    transition: all 0.1s ease;
    text-transform: uppercase;
}

.brutal-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0px var(--dark);
}

.brutal-btn:active {
    transform: translate(6px, 6px);
    box-shadow: 0px 0px 0px var(--dark);
}

/* --- STATUS AREA --- */
.status-box {
    background: var(--primary);
    border: 3px solid var(--dark);
    padding: 20px;
    text-align: center;
    font-weight: 700;
    box-shadow: 6px 6px 0px var(--dark);
}

.hidden {
    display: none;
}

.status-box a {
    color: var(--dark);
    text-decoration: none;
    border-bottom: 3px solid var(--dark);
    font-size: 1.2rem;
    font-weight: 900;
}

.status-box a:hover {
    background: var(--dark);
    color: var(--primary);
}

/* --- FOOTER INFO --- */
.page-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.info-block {
    background: #fff;
    border: 3px solid var(--dark);
    padding: 15px;
    box-shadow: 4px 4px 0px var(--dark);
}

.info-block h3 {
    font-size: 0.9rem;
    margin-bottom: 5px;
    text-decoration: underline;
    font-weight: 900;
}

.info-block p {
    font-size: 0.8rem;
    line-height: 1.4;
    font-weight: 500;
}

/* Mobile Fixes */
@media (max-width: 480px) {
    .page-info { grid-template-columns: 1fr; }
    .container { padding-top: 20px; }
}