/* ==============================================================================
   Teams Background Generator - Standalone CSS (Vanilla CSS)
   ============================================================================== */

:root {
    --bg-color: #080A12;
    --bg-gradient: radial-gradient(circle at 50% 0%, #290505 0%, #080a12 85%);
    
    --panel-bg: rgba(17, 22, 41, 0.55);
    --panel-border: rgba(174, 0, 0, 0.25);
    --panel-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    --text-main: #FFFFFF;
    --text-muted: #A0A5C0;
    --text-dark: #64748B;
    
    --primary-color: #ae0000;
    --primary-hover: #d10000;
    --accent-color: #e50000;
    
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'Consolas', monospace;
}

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

body {
    background-color: var(--bg-color);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.5;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.view-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.app-container {
    width: 100%;
    max-width: 1400px; /* Increased to fit the larger 960px preview side-by-side */
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    border-bottom: 1px solid rgba(174, 0, 0, 0.25);
    background-color: rgba(6, 8, 15, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 8px;
    width: 100%;
}

.nav-logo {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
}

.nav-logo-img {
    height: 38px;
    width: auto;
    display: block;
    object-fit: contain;
}

.logo-red {
    color: #ae0000;
    font-weight: 900;
}

.logo-white {
    color: #ffffff;
}

.portal-badge {
    background-color: rgba(174, 0, 0, 0.15);
    color: #ff5555;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 5px;
}

/* Glassmorphism Panel Component */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--panel-shadow);
}

/* Inputs & Form Elements */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-bottom: 20px;
}

.input-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"] {
    background-color: rgba(10, 14, 27, 0.7);
    border: 1px solid var(--panel-border);
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 14px;
    width: 100%;
    outline: none;
    transition: all 0.3s ease;
}

input[type="text"]:focus {
    border-color: var(--primary-hover);
    box-shadow: 0 0 10px rgba(174, 0, 0, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.25s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #800000 100%);
    color: var(--text-main);
    box-shadow: 0 4px 15px rgba(174, 0, 0, 0.3);
    width: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(209, 0, 0, 0.4);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    background: #1B2138;
    color: var(--text-dark);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Specific button update to make it prominent and pushed below */
#btnGenerateTeams {
    margin-top: 25px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.8px;
    box-shadow: 0 6px 22px rgba(174, 0, 0, 0.45);
    background: linear-gradient(135deg, #cc0000 0%, #800000 100%);
}

#btnGenerateTeams:hover {
    background: linear-gradient(135deg, #e60000 0%, #ae0000 100%);
    box-shadow: 0 8px 28px rgba(209, 0, 0, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #232943;
    border: 1px solid var(--panel-border);
    color: var(--text-muted);
}

.btn-secondary:hover {
    background-color: #313757;
    color: var(--text-main);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 380px 1fr; /* Set fixed column size for the form and take remaining for preview */
    gap: 30px;
    align-items: start;
}

.form-card h2, .preview-card h2, .instructions-card h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-main);
    border-left: 3px solid var(--primary-hover);
    padding-left: 10px;
}

.form-card form {
    display: flex;
    flex-direction: column;
}

/* Preview Section */
.preview-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.id-card-outer {
    background: #06080F;
    border: 1px solid rgba(47, 54, 95, 0.5);
    border-radius: 12px;
    padding: 20px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 580px;
}

/* Teams Background Preview - Enlarged to 960x540 (1.5x) */
.teams-preview-box {
    width: 960px;
    height: 540px;
    position: relative;
    overflow: hidden;
    background-color: #06080F;
    border: 1px solid rgba(174, 0, 0, 0.25);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65);
    border-radius: 8px;
}

.teams-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    pointer-events: none;
}

.teams-center-name {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    color: #800000;
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
    z-index: 2;
    line-height: 1.1;
    font-family: 'Outfit', sans-serif;
    word-break: break-word;
    letter-spacing: -1.5px;
}

.teams-right-block {
    position: absolute;
    top: 11.5%;
    right: 5.6%; /* Matches 107px / 1920px = 5.57% */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    z-index: 2;
    font-family: 'Outfit', sans-serif;
}



.teams-right-name {
    color: #1a1f38;
    font-size: 22px; /* 1.5x scaled from 15px */
    font-weight: 700;
    text-transform: capitalize;
    line-height: 1.2;
    padding-bottom: 3px;
    white-space: nowrap;
    text-align: left;
}

/* The red line starts at the left of the block and stretches to the right edge of the preview card */
.teams-right-line {
    height: 3px; /* 1.5x scaled thickness */
    background-color: #ae0000;
    align-self: stretch;
    margin: 3px -55px 9px 0; /* stretches it to the absolute right edge (0% gap) */
}

.teams-right-designation {
    color: #1a1f38;
    font-size: 16px; /* 1.5x scaled from 11px */
    font-weight: 500;
    text-transform: capitalize;
    line-height: 1.2;
    white-space: nowrap;
    text-align: left;
}

/* Instructions Panel Styling */
.instructions-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 15px;
}

.step-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.step-num {
    background: rgba(174, 0, 0, 0.15);
    color: #ff5555;
    border: 1px solid rgba(174, 0, 0, 0.35);
    font-size: 14px;
    font-weight: 800;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(174, 0, 0, 0.2);
}

.step-item p {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.5;
}

.step-item strong {
    color: var(--text-main);
    font-weight: 600;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(10, 14, 27, 0.1);
}

::-webkit-scrollbar-thumb {
    background: var(--panel-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .id-card-outer {
        min-height: auto;
    }
    .teams-preview-box {
        width: 100%;
        max-width: 960px;
        height: auto;
        aspect-ratio: 16 / 9;
    }
    
    /* Make right line responsive for dynamic scaling states */
    .teams-right-line {
        width: calc(100% + 5.6%); 
    }
}
