/* Modern, glassmorphism dark theme for Browserling test */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap');

:root {
    --bg-grad-1: #0f172a;
    --bg-grad-2: #1e1b4b;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary: #8b5cf6;
    --primary-hover: #a78bfa;
    --success: #10b981;
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--bg-grad-1), var(--bg-grad-2));
    color: var(--text-main);
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    box-sizing: border-box;
}

.container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    width: 100%;
    max-width: 800px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    margin-bottom: 2rem;
}

h1 {
    font-weight: 800;
    margin: 0;
    background: linear-gradient(to right, #c084fc, #38bdf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2.2rem;
    text-align: center;
}

p.subtitle {
    color: var(--text-muted);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

#os-selector {
    padding: 10px;
    border-radius: 8px;
    background: var(--glass-bg);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    outline: none;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
}

#os-selector option,
#os-selector optgroup {
    background-color: #1e1e1e;
    color: #ffffff;
}

button {
    background: var(--glass-bg);
    border: 1px solid var(--primary);
    color: var(--text-main);
    padding: 0.85rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

button.primary {
    background: var(--primary);
    border-color: var(--primary);
}

button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(139, 92, 246, 0.3);
}

button.primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

button.vivid {
    background: #ec4899;
    border-color: #ec4899;
}

button.vivid:hover {
    background: #f472b6;
    border-color: #f472b6;
    box-shadow: 0 10px 15px -3px rgba(236, 72, 153, 0.4);
}

button:active {
    transform: scale(0.95);
}

/* Browser List Styles */
#list-browsers {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
}

#list-browsers li {
    display: flex;
    gap: 5px;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#list-browsers li button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

#list-browsers li button:last-child {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}

#list-browsers li button:last-child:hover {
    background: #ef4444;
    color: white;
}

/* Viewport Styles */
#browsers {
    width: 100%;
    max-width: 1200px;
    flex-grow: 1;
    min-height: 600px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 20px;
}

#browsers>div {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

#browsers.horizontal {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100vw;
    width: 100vw;
    margin-left: -2rem;
    margin-right: -2rem;
    padding-left: 2rem;
    padding-right: 2rem;
    border-radius: 0;
    box-sizing: border-box;
}

#browsers.horizontal>div {
    flex: 1 1 0%;
    width: auto;
    max-width: 100%;
    height: 100vh;
    min-width: 300px;
}

#browsers.horizontal>div:not(:last-child) {
    border-right: 2px solid var(--glass-border);
}

.browser-title {
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 12px;
    margin: 0;
    text-align: center;
    border-bottom: 2px solid var(--primary);
    flex-shrink: 0;
}

#browsers iframe {
    border: none;
    width: 100%;
    flex-grow: 1;
}