:root {
    --bg-main: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --accent: #8b5cf6;
    --border: rgba(255, 255, 255, 0.1);
}

:root.light-mode {
    --bg-main: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.85);
    --text-main: #0f172a;
    --text-muted: #475569;
    --border: rgba(0, 0, 0, 0.05);
}


body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    backdrop-filter: blur(10px);
    border: none;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

:root.light-mode .btn-outline:hover {
    background: rgba(0, 0, 0, 0.05);
}

.secondary-btn {
    background-color: #475569;
    color: white;
    border: none;
}

.secondary-btn:hover {
    background-color: #334155;
}

:root.light-mode .secondary-btn {
    background-color: #cbd5e1;
    color: var(--text-main);
}

:root.light-mode .secondary-btn:hover {
    background-color: #94a3b8;
}

main {
    flex: 1;
    padding: 2rem 5%;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.hero {
    text-align: center;
    padding: 6rem 0;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

:root.light-mode .glass-card {
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.08);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.6);
}

:root.light-mode .glass-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.12);
}

/* Dashboard Specifics */
.modal-input {
    width: 100%;
    padding: 0.8rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.modal-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

:root.light-mode .modal-input {
    background: rgba(255, 255, 255, 0.8);
}

.repo-list-item {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s ease, background 0.2s ease;
}

.repo-list-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

:root.light-mode .repo-list-item {
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

:root.light-mode .repo-list-item:hover {
    background: rgba(255, 255, 255, 1);
}

.repo-badge {
    font-size: 0.8rem;
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    color: var(--text-muted);
}

:root.light-mode .repo-badge {
    background: rgba(0,0,0,0.05);
}

.api-key-display {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 6px;
    font-family: monospace;
    word-break: break-all;
    margin-bottom: 1rem;
    color: var(--text-main);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

:root.light-mode .api-key-display {
    background: rgba(0, 0, 0, 0.05);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.keys-container {
    padding: 1.5rem 1rem 1rem 1rem;
    background: rgba(0,0,0,0.15);
    border-radius: 0 0 8px 8px;
    margin-top: -0.5rem;
    position: relative;
    z-index: 1;
}

:root.light-mode .keys-container {
    background: rgba(255, 255, 255, 0.5);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.btn-outline.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
}

:root.light-mode .btn-outline.active {
    background: rgba(0, 0, 0, 0.05);
}


.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

/* Modern Select Dropdowns */
.modern-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    padding: 0.6rem 2.5rem 0.6rem 1rem;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2394a3b8%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem top 50%;
    background-size: 0.65rem auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modern-select:hover {
    border-color: var(--primary-color);
    background-color: rgba(30, 41, 59, 0.8);
}

.modern-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.modern-select option {
    background-color: var(--bg-main);
    color: var(--text-main);
    padding: 0.5rem;
}

:root.light-mode .modern-select {
    background-color: rgba(255, 255, 255, 0.9);
    border-color: var(--border);
    color: var(--text-main);
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2364748b%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
}

:root.light-mode .modern-select:hover {
    background-color: #ffffff;
}

:root.light-mode .modern-select option {
    background-color: #ffffff;
    color: var(--text-main);
}

/* Modern Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}
