/* Universal Box-Sizing and Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Variables for Madden NFL theme colors */
:root {
    --madden-blue: #007bff;        /* Primary Accent/CTA Blue */
    --madden-silver: #c0c0c0;      /* Secondary Highlight/Text */
    --madden-dark-bg: #111111;     /* Deep Black Background */
    --madden-card-dark: #1f1f1f;   /* Inner Card/Section Dark Gray */
    --madden-success: #28a745;     /* Green for success */
}

/* --- MAIN LANDING PAGE STYLES --- */
body {
    /* Use a dark, textured background (if you add a texture image) */
    font-family: 'Roboto', sans-serif; /* Clean, modern font */
    background-color: var(--madden-dark-bg);
    color: var(--madden-silver);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 30px 20px;
}

.container {
    width: 100%;
    max-width: 580px;
    background-color: var(--madden-card-dark);
    border-radius: 8px; 
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.7);
    padding: 30px;
    text-align: center;
    border: 1px solid rgba(0, 123, 255, 0.2); /* Subtle blue border */
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 8px;
    color: var(--madden-silver);
    text-transform: uppercase;
    font-weight: 900;
}

.highlight {
    color: var(--madden-blue); /* Blue is the key accent */
}

header p {
    font-size: 1.1em;
    margin-bottom: 25px;
    color: #999999;
    font-weight: 300;
}

/* Image Placeholder */
.image-container {
    margin-bottom: 30px;
    border-radius: 4px;
    overflow: hidden;
    border: 3px solid var(--madden-blue); /* Bold blue frame */
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.5);
}

.image-container img {
    width: 100%;
    height: auto;
    display: block;
    min-height: 200px; 
    background-color: #000000; 
    object-fit: cover;
}

/* Section Styling */
.download-section {
    padding: 20px;
    border-radius: 8px;
    background-color: #2a2a2a; 
}

.search-label {
    margin-bottom: 15px;
    font-weight: 700;
    font-size: 1em;
    color: var(--madden-silver); 
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ready-text {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--madden-text-light);
}

/* Primary CTA Button (Opens Modal) */
.btn-download {
    display: block;
    text-decoration: none;
    background-color: var(--madden-blue); /* Main Madden Blue CTA */
    color: white;
    padding: 18px 30px;
    font-size: 1.5em;
    font-weight: 900; 
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 6px 15px rgba(0, 123, 255, 0.5);
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-download:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.8);
}

.icon { margin-right: 10px; font-size: 1em; }
.secure-note { margin-top: 15px; font-size: 0.85em; color: #777777; }
footer { 
    margin-top: 30px; 
    padding-top: 15px; 
    border-top: 1px solid rgba(0, 123, 255, 0.1); 
    font-size: 0.8em; 
    color: #777777; 
}
.hidden { display: none !important; }

/* --- MODAL POP-UP STYLES --- */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); 
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: var(--madden-card-dark);
    padding: 35px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 1);
    width: 90%;
    max-width: 450px;
    text-align: center;
    border: 2px solid var(--madden-blue); 
    animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modal Steps Styling */
.modal-step h2 {
    font-size: 1.6em;
    margin-bottom: 15px;
    color: var(--madden-blue);
    text-transform: uppercase;
}

.modal-step p {
    margin-bottom: 20px;
    color: #cccccc;
    font-weight: 300;
}

.search-input#modalDeviceInput {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    border: 1px solid var(--madden-blue);
    border-radius: 4px;
    background-color: #000000;
    color: var(--madden-silver);
    text-align: center;
    margin-bottom: 15px;
}

.btn-check {
    background-color: var(--madden-silver); /* Silver button for check */
    color: var(--madden-dark-bg);
    padding: 10px 25px;
    border: none;
    border-radius: 4px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: bold;
    text-transform: uppercase;
}

.btn-check:hover {
    background-color: #a0a0a0;
}

/* Step 2: Spinner and Animation */
.spinner {
    border: 4px solid rgba(0, 123, 255, 0.2);
    border-top: 4px solid var(--madden-blue);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.status-animating {
    color: var(--madden-blue);
    font-weight: bold;
    font-style: italic;
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    from { opacity: 1; }
    to { opacity: 0.6; }
}

/* Step 3: Success Styles */
.final-ready-message {
    font-size: 1.5em;
    font-weight: 900;
    margin-bottom: 10px;
    color: var(--madden-success);
    text-transform: uppercase;
}

.highlight-final {
    display: block;
    padding: 5px 0;
    border-bottom: 2px solid var(--madden-success);
}

.final-instruction {
    font-size: 1em;
    margin-bottom: 25px !important;
}

/* Final CTA inside modal */
.btn-download.final-cta {
    background-color: var(--madden-success); /* Use green for final success CTA */
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.6);
}

.btn-download.final-cta:hover {
    background-color: #1e7e34;
    box-shadow: 0 7px 20px rgba(40, 167, 69, 0.8);
}