/* SphereWorld Premium Architecture Styling */
:root {
    --bg-main: #06070d;
    --bg-card: rgba(18, 22, 35, 0.45);
    --border-glass: rgba(255, 255, 255, 0.07);
    --accent-glow: rgba(0, 242, 254, 0.15);
    --text-primary: #f1f3f9;
    --text-muted: #848b9c;
    --primary-gradient: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Ambient Background Light */
.glow-bg {
    position: fixed;
    top: -10%;
    left: 25%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
    filter: blur(40px);
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 3rem;
    background: rgba(6, 7, 13, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(120deg, #fff, #a1c4fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nav-item:hover, .nav-item.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

/* Containers */
.app-container {
    max-width: 1200px;
    margin: 2.5rem auto;
    padding: 0 2rem;
}

.app-view {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.app-view.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Headers */
.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -1px;
}

.subtitle {
    color: var(--text-muted);
    margin: 0.4rem 0 0 0;
    font-size: 1rem;
}

/* Premium Component Buttons */
.btn-primary {
    background: var(--primary-gradient);
    color: #000;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-danger {
    background: rgba(235, 87, 87, 0.1);
    color: #eb5757;
    border: 1px solid rgba(235, 87, 87, 0.2);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: #eb5757;
    color: #fff;
}

/* Grids & Cards */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.premium-card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.premium-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
    color: #fff;
}

/* Live Output metrics */
.time-display {
    font-size: 1.9rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin: 1.2rem 0;
    letter-spacing: -0.5px;
}

/* Account Module Layouts */
.error-card {
    background: rgba(235, 87, 87, 0.04);
    border: 1px solid rgba(235, 87, 87, 0.15);
    border-radius: 24px;
    padding: 4rem 2rem;
    text-align: center;
    max-width: 550px;
    margin: 4rem auto;
}

.error-badge {
    font-size: 4rem;
    font-weight: 900;
    color: #eb5757;
    margin-bottom: 1rem;
}

.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 3rem;
    max-width: 750px;
    margin: 0 auto;
}

.profile-layout {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.profile-avatar-sec {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#profile-avatar-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.1);
    background: #0a0b10;
}

.avatar-select-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.profile-details-sec {
    flex: 1;
}

/* Input Fields styling */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

input[type="text"], input[type="datetime-local"], select {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: #4facfe;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.checkbox-group input {
    width: auto;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Modals layer architecture */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: #111422;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 440px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal-box {
    transform: scale(1);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.hidden { display: none !important; }

/* Responsive Grid adjustment */
@media(max-width: 768px) {
    .navbar { padding: 1rem 1.5rem; flex-direction: column; gap: 1rem; }
    .profile-layout { flex-direction: column; text-align: center; gap: 1.5rem; }
    .view-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
}
