:root {
    --ocean-dark: #0a1628;
    --ocean-mid: #0f2744;
    --ocean-light: #1a3a5c;
    --accent: #00d4ff;
    --accent-dim: #0099bb;
    --bubble: rgba(0, 212, 255, 0.08);
    --text: #c8dce8;
    --text-bright: #ffffff;
    --danger: #ff4466;
    --card-bg: rgba(15, 39, 68, 0.7);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--ocean-dark);
    color: var(--text);
    min-height: 100vh;
}

/* Bubbles animation */
@keyframes rise {
    0% { bottom: -50px; opacity: 0.7; }
    100% { bottom: 110vh; opacity: 0; }
}

@keyframes sway {
    0%, 100% { margin-left: 0; }
    50% { margin-left: 30px; }
}

.bubbles {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.bubbles span {
    position: absolute;
    bottom: -50px;
    background: radial-gradient(circle at 30% 30%, rgba(0, 212, 255, 0.25), rgba(0, 212, 255, 0.05));
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 50%;
    animation: rise linear infinite, sway ease-in-out infinite;
}

.bubbles span:nth-child(1) { width: 30px; height: 30px; left: 10%; animation-duration: 8s, 3s; animation-delay: 0s; }
.bubbles span:nth-child(2) { width: 18px; height: 18px; left: 25%; animation-duration: 12s, 4s; animation-delay: 2s; }
.bubbles span:nth-child(3) { width: 24px; height: 24px; left: 45%; animation-duration: 10s, 3.5s; animation-delay: 1s; }
.bubbles span:nth-child(4) { width: 40px; height: 40px; left: 60%; animation-duration: 14s, 5s; animation-delay: 3s; }
.bubbles span:nth-child(5) { width: 14px; height: 14px; left: 75%; animation-duration: 9s, 2.5s; animation-delay: 0.5s; }
.bubbles span:nth-child(6) { width: 22px; height: 22px; left: 85%; animation-duration: 11s, 4s; animation-delay: 4s; }
.bubbles span:nth-child(7) { width: 36px; height: 36px; left: 35%; animation-duration: 13s, 3s; animation-delay: 2.5s; }
.bubbles span:nth-child(8) { width: 16px; height: 16px; left: 55%; animation-duration: 7s, 3s; animation-delay: 1.5s; }

/* Auth pages */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(180deg, #050d1a 0%, #0a1b33 30%, #0f2744 60%, #162f4d 100%);
    position: relative;
}

.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--ocean-light);
    border-radius: 16px;
    padding: 44px;
    width: 400px;
    backdrop-filter: blur(12px);
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.auth-card .logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-card .logo .fish-icon {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

.auth-card .logo h1 {
    color: var(--accent);
    font-size: 26px;
    letter-spacing: 3px;
    font-weight: 800;
}

.auth-card .logo p {
    color: var(--accent-dim);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-top: 6px;
}

.auth-card .logo .tagline {
    color: var(--text);
    font-size: 13px;
    letter-spacing: 0;
    text-transform: none;
    margin-top: 12px;
    font-style: italic;
    opacity: 0.7;
}

.auth-card input {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 14px;
    background: rgba(5, 13, 26, 0.8);
    border: 1px solid var(--ocean-light);
    border-radius: 8px;
    color: var(--text-bright);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-card input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.15);
}

.auth-card input::placeholder {
    color: rgba(200, 220, 232, 0.35);
}

.auth-card button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    color: var(--ocean-dark);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    margin-top: 8px;
    transition: opacity 0.2s;
}

.auth-card button:hover {
    opacity: 0.85;
}

.auth-card .link {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--text);
    opacity: 0.7;
}

.auth-card .link a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.error {
    background: rgba(255, 68, 102, 0.12);
    border: 1px solid rgba(255, 68, 102, 0.3);
    color: var(--danger);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
}

/* Dashboard */
.dashboard {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--ocean-dark) 0%, #0d1f3c 100%);
    position: relative;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 32px;
    height: 64px;
    background: rgba(10, 22, 40, 0.9);
    border-bottom: 1px solid var(--ocean-light);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar .brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar .brand .fish-icon { font-size: 24px; }

.topbar .brand h1 {
    color: var(--accent);
    font-size: 18px;
    letter-spacing: 2px;
    font-weight: 800;
}

.topbar .brand span {
    color: var(--accent-dim);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.topbar .profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar .profile a { text-decoration: none; }

.topbar .profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    cursor: pointer;
    object-fit: cover;
    background: var(--ocean-light);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.topbar .profile img:hover {
    border-color: var(--text-bright);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
}

.topbar .profile .username {
    color: var(--text);
    font-size: 14px;
}

.topbar .profile .logout {
    color: var(--accent-dim);
    text-decoration: none;
    font-size: 12px;
    margin-left: 8px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.topbar .profile .logout:hover { opacity: 1; }

/* Dashboard content */
.content {
    padding: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.welcome-banner {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(0, 153, 187, 0.05));
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 28px;
}

.welcome-banner h2 {
    color: var(--text-bright);
    font-size: 20px;
    margin-bottom: 6px;
}

.welcome-banner p {
    color: var(--text);
    font-size: 13px;
    opacity: 0.8;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--ocean-light);
    border-radius: 10px;
    padding: 22px;
    backdrop-filter: blur(10px);
    transition: border-color 0.2s;
}

.stat-card:hover { border-color: var(--accent-dim); }

.stat-card .icon { font-size: 24px; margin-bottom: 10px; }

.stat-card .label {
    color: var(--accent-dim);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
}

.stat-card .value {
    color: var(--text-bright);
    font-size: 28px;
    font-weight: 700;
}

.stat-card .sub {
    color: var(--text);
    font-size: 11px;
    margin-top: 4px;
    opacity: 0.7;
}

.panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 800px) {
    .panels { grid-template-columns: 1fr; }
}

.panel {
    background: var(--card-bg);
    border: 1px solid var(--ocean-light);
    border-radius: 10px;
    padding: 24px;
    backdrop-filter: blur(10px);
}

.panel h2 {
    color: var(--accent);
    font-size: 14px;
    margin-bottom: 16px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(26, 58, 92, 0.4);
    font-size: 13px;
}

.activity-item:last-child { border-bottom: none; }

.activity-item .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.activity-item .dot.warning { background: #ffaa00; }
.activity-item .dot.offline { background: #556677; }

.activity-item .time {
    color: var(--accent-dim);
    font-size: 11px;
    margin-left: auto;
    flex-shrink: 0;
}

/* Settings */
.settings-container {
    max-width: 640px;
    margin: 40px auto;
    padding: 0 32px;
    position: relative;
    z-index: 1;
}

.settings-container h1 {
    color: var(--accent);
    font-size: 22px;
    margin-bottom: 8px;
}

.settings-container .subtitle {
    color: var(--text);
    font-size: 13px;
    opacity: 0.6;
    margin-bottom: 24px;
}

.settings-container textarea {
    width: 100%;
    padding: 16px;
    background: rgba(5, 13, 26, 0.8);
    border: 1px solid var(--ocean-light);
    border-radius: 8px;
    color: var(--text-bright);
    font-family: 'Courier New', monospace;
    font-size: 13px;
    resize: vertical;
    min-height: 180px;
    outline: none;
    transition: border-color 0.2s;
}

.settings-container textarea:focus {
    border-color: var(--accent);
}

.settings-container button {
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    color: var(--ocean-dark);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 14px;
    transition: opacity 0.2s;
}

.settings-container button:hover { opacity: 0.85; }

.settings-container .back {
    display: inline-block;
    margin-top: 16px;
    color: var(--accent-dim);
    text-decoration: none;
    font-size: 13px;
}
