/* ========================================
   Shrktooth - Ocean Theme Styles
   Deep blue / teal underwater aesthetic
======================================== */

:root {
    --abyss: #0a1628;
    --deep: #0f2744;
    --mid: #1a3a5c;
    --teal: #00b4d8;
    --cyan: #48cae4;
    --foam: #90e0ef;
    --sand: #f0e6d2;
    --coral: #ff6b6b;
    --biolum: #7b2cbf;
    --text: #e0f7fa;
    --text-muted: #a0c4d8;
    --card-bg: rgba(15, 39, 68, 0.85);
    --glass: rgba(26, 58, 92, 0.6);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --glow: 0 0 20px rgba(0, 180, 216, 0.3);
    --radius: 16px;
    --font-main: 'Outfit', system-ui, sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--abyss);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Ocean background layers */
.ocean-bg {
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(0, 180, 216, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(123, 44, 191, 0.1) 0%, transparent 40%),
        linear-gradient(180deg, #0a1628 0%, #0f2744 40%, #0a3a4a 100%);
    z-index: -2;
}

.bubbles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -20px;
    background: rgba(144, 224, 239, 0.15);
    border-radius: 50%;
    animation: rise linear infinite;
}

@keyframes rise {
    0% { transform: translateY(0) scale(1); opacity: 0.4; }
    50% { opacity: 0.7; }
    100% { transform: translateY(-110vh) scale(1.5); opacity: 0; }
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 22, 40, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 180, 216, 0.2);
    padding: 0.8rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--cyan);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 8px rgba(0, 180, 216, 0.6));
}

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

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s, text-shadow 0.2s;
}

.nav-link:hover {
    color: var(--cyan);
    text-shadow: 0 0 10px rgba(0, 180, 216, 0.5);
}

.cta-btn, .upload-btn {
    background: linear-gradient(135deg, var(--teal), var(--biolum));
    color: white !important;
    padding: 0.5rem 1.2rem;
    border-radius: 999px;
    font-weight: 600;
}

.cta-btn:hover, .upload-btn:hover {
    box-shadow: var(--glow);
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--cyan);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Main content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
    min-height: calc(100vh - 160px);
}

/* Landing Hero */
.hero {
    text-align: center;
    padding: 4rem 1rem 3rem;
    position: relative;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--foam), var(--cyan), var(--teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    text-shadow: 0 0 40px rgba(0, 180, 216, 0.3);
}

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

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.8rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: var(--font-main);
}

.btn-primary {
    background: linear-gradient(135deg, var(--teal), #0077b6);
    color: white;
    box-shadow: 0 4px 20px rgba(0, 180, 216, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(0, 180, 216, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--cyan);
    border: 2px solid var(--teal);
}

.btn-secondary:hover {
    background: rgba(0, 180, 216, 0.15);
}

/* Cards & Feed */
.section-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--foam);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.feed {
    display: grid;
    gap: 1.5rem;
}

.post-card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 180, 216, 0.15);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), var(--glow);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.2rem;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--teal);
    background: var(--mid);
}

.post-user {
    flex: 1;
}

.post-user .name {
    font-weight: 600;
    color: var(--foam);
}

.post-user .meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.post-media {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    background: #000;
    display: block;
}

.post-media video {
    width: 100%;
    max-height: 500px;
}

.post-body {
    padding: 1rem 1.2rem;
}

.post-caption {
    margin-bottom: 0.8rem;
    color: var(--text);
}

.post-actions {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0, 180, 216, 0.1);
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.action-btn:hover, .action-btn.liked {
    color: var(--coral);
}

.action-btn.liked .heart {
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* Comments */
.comments-section {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(0, 180, 216, 0.1);
}

.comment {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
}

.comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.comment-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.comment-form input {
    flex: 1;
    background: var(--glass);
    border: 1px solid rgba(0, 180, 216, 0.2);
    border-radius: 999px;
    padding: 0.5rem 1rem;
    color: var(--text);
    font-family: inherit;
}

.comment-form button {
    background: var(--teal);
    border: none;
    border-radius: 999px;
    padding: 0.5rem 1rem;
    color: white;
    cursor: pointer;
    font-weight: 600;
}

/* Auth forms */
.auth-container {
    max-width: 420px;
    margin: 3rem auto;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2.5rem;
    border: 1px solid rgba(0, 180, 216, 0.2);
    box-shadow: var(--shadow);
}

.auth-container h1 {
    font-family: var(--font-display);
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--foam);
}

.auth-container .subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--glass);
    border: 1px solid rgba(0, 180, 216, 0.25);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.2);
}

.form-error {
    background: rgba(255, 107, 107, 0.15);
    border: 1px solid var(--coral);
    color: #ffb3b3;
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.form-success {
    background: rgba(0, 180, 216, 0.15);
    border: 1px solid var(--teal);
    color: var(--foam);
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Profile */
.profile-header {
    display: flex;
    gap: 2rem;
    align-items: center;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 180, 216, 0.15);
    flex-wrap: wrap;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--teal);
    box-shadow: var(--glow);
}

.profile-info h1 {
    font-family: var(--font-display);
    color: var(--foam);
    margin-bottom: 0.3rem;
}

.profile-info .username {
    color: var(--teal);
    margin-bottom: 0.5rem;
}

.profile-bio {
    color: var(--text-muted);
    max-width: 500px;
}

/* Upload page */
.upload-area {
    background: var(--card-bg);
    border: 2px dashed rgba(0, 180, 216, 0.4);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}

.upload-area.dragover {
    border-color: var(--cyan);
    background: rgba(0, 180, 216, 0.1);
}

.upload-area input[type="file"] {
    display: none;
}

.preview-container {
    margin-top: 1.5rem;
    display: none;
}

.preview-container img,
.preview-container video {
    max-width: 100%;
    max-height: 300px;
    border-radius: 12px;
}

/* Section pages */
.section-hero {
    text-align: center;
    padding: 2rem 1rem;
    margin-bottom: 2rem;
}

.section-hero h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--foam);
    margin-bottom: 0.5rem;
}

.section-hero p {
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* Footer */
.footer {
    background: rgba(10, 22, 40, 0.95);
    border-top: 1px solid rgba(0, 180, 216, 0.15);
    padding: 2.5rem 1.5rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.footer-brand {
    color: var(--cyan);
    font-weight: 700;
    font-size: 1.2rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--cyan);
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: right;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--deep);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid rgba(0, 180, 216, 0.2);
    }
    
    .nav-links.open {
        display: flex;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-copy {
        text-align: center;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
}

/* Utility */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }

/* ========================================
   VIDEO-FIRST SHELL (design-shell additions)
======================================== */
:focus-visible { outline: 2px solid var(--foam); outline-offset: 2px; border-radius: 6px; }
.skip-link { position:absolute; left:-999px; top:0; background:var(--teal); color:var(--abyss); padding:.5rem 1rem; z-index:200; }
.skip-link:focus { left:1rem; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.nav-container.vnav { max-width:1600px; gap:1rem; }
.search-bar { flex:1; max-width:560px; display:flex; margin:0 auto; }
.search-bar input { flex:1; min-width:0; padding:.6rem 1rem; background:rgba(10,22,40,.7); border:1px solid rgba(72,202,228,.35); border-right:none; border-radius:999px 0 0 999px; color:var(--text); font:inherit; }
.search-bar input::placeholder { color:var(--text-muted); }
.search-bar input:focus { border-color:var(--cyan); outline:none; box-shadow:var(--glow); }
.search-bar button { padding:0 1.1rem; background:var(--glass); border:1px solid rgba(72,202,228,.35); border-radius:0 999px 999px 0; color:var(--foam); cursor:pointer; font-size:1rem; }
.search-bar button:hover { background:var(--mid); }
.video-main { max-width:1600px; margin:0 auto; padding:1.25rem 1.5rem 3rem; }
.chip-row { display:flex; gap:.6rem; overflow-x:auto; padding:.25rem 0 1rem; scrollbar-width:none; position:sticky; top:64px; z-index:50; }
.chip-row::-webkit-scrollbar { display:none; }
.chip { flex:0 0 auto; padding:.45rem 1rem; border-radius:999px; background:var(--glass); border:1px solid rgba(72,202,228,.25); color:var(--text); font:500 .9rem var(--font-display); cursor:pointer; backdrop-filter:blur(8px); }
.chip:hover { border-color:var(--cyan); }
.chip.active, .chip[aria-pressed="true"] { background:var(--teal); color:var(--abyss); border-color:var(--teal); }
.video-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:1.75rem 1.25rem; }
.video-card { display:block; color:inherit; text-decoration:none; }
.video-card:hover .thumb { transform:translateY(-3px); box-shadow:var(--glow); }
.thumb { position:relative; aspect-ratio:16/9; border-radius:12px; overflow:hidden; transition:.2s; display:flex; align-items:center; justify-content:center; font-size:2.6rem; background:linear-gradient(135deg,var(--mid),var(--abyss)); }
.thumb.t-scuba { background:linear-gradient(160deg,#0a3a4a,#00b4d8 140%); }
.thumb.t-spear { background:linear-gradient(160deg,#0f2744,#1a6a7c); }
.thumb.t-fish { background:linear-gradient(160deg,#123b5c,#48cae4 160%); }
.thumb.t-boat { background:linear-gradient(160deg,#1a3a5c,#90e0ef 180%); }
.thumb.t-cons { background:linear-gradient(160deg,#2a1a4c,#7b2cbf 150%); }
.duration { position:absolute; right:8px; bottom:8px; background:rgba(0,0,0,.8); color:#fff; font:600 .78rem var(--font-display); padding:2px 6px; border-radius:4px; }
.card-body { display:flex; gap:.75rem; margin-top:.75rem; }
.avatar { flex:0 0 36px; width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:700; color:var(--abyss); background:linear-gradient(135deg,var(--foam),var(--teal)); }
.card-title { font:600 1rem/1.35 var(--font-main); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.card-meta { color:var(--text-muted); font-size:.86rem; }
/* Watch page */
.watch-layout { display:grid; grid-template-columns:minmax(0,1fr) 380px; gap:1.5rem; }
.player-shell { aspect-ratio:16/9; background:radial-gradient(circle at 50% 50%,#0f2744,#000 80%); border-radius:14px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.75rem; color:var(--text-muted); border:1px solid rgba(72,202,228,.2); }
.play-icon { width:76px; height:76px; border-radius:50%; background:var(--teal); color:var(--abyss); font-size:2rem; display:flex; align-items:center; justify-content:center; box-shadow:var(--glow); }
.watch-title { font:700 1.4rem/1.3 var(--font-display); margin:1rem 0 .3rem; }
.channel-row { display:flex; align-items:center; gap:.75rem; margin:1rem 0; flex-wrap:wrap; }
.channel-row .avatar { width:44px; height:44px; flex-basis:44px; }
.subscribe-btn { margin-left:auto; padding:.55rem 1.3rem; border-radius:999px; border:none; background:var(--foam); color:var(--abyss); font-weight:700; cursor:pointer; }
.description { background:var(--card-bg); border-radius:12px; padding:1rem; font-size:.95rem; }
.up-next h2, .comments h2 { font:600 1.1rem var(--font-display); margin-bottom:.75rem; }
.up-next-item { display:flex; gap:.6rem; margin-bottom:.8rem; color:inherit; text-decoration:none; }
.up-next-item .thumb { flex:0 0 168px; font-size:1.6rem; border-radius:8px; }
.up-next-item .card-title { font-size:.92rem; }
.comments { margin-top:2rem; }
.comment { display:flex; gap:.75rem; margin-bottom:1.1rem; }
.comment strong { font-size:.88rem; }
@media (max-width:1000px) { .watch-layout { grid-template-columns:1fr; } }
@media (max-width:768px) {
  .nav-container.vnav { flex-wrap:wrap; }
  .search-bar { order:3; flex-basis:100%; max-width:none; }
  .chip-row { top:auto; position:static; }
  .video-main { padding:1rem; }
  .video-grid { grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); }
}
@media (max-width:520px) { .video-grid { grid-template-columns:1fr; } .up-next-item .thumb { flex-basis:140px; } }
a.chip { text-decoration:none; display:inline-block; }

/* Contrast fix: readable text on video pages */
.video-card,
.video-card:link,
.video-card:visited,
.up-next-item,
.up-next-item:link,
.up-next-item:visited {
  color: var(--text);
}
.video-card .card-title,
.up-next-item .card-title,
.watch-title {
  color: #f5fcff;
}
.video-card .card-meta,
.up-next-item .card-meta,
.player-shell,
.description,
.channel-row .card-meta {
  color: #c5e4f2;
}
a.chip,
a.chip:link,
a.chip:visited {
  color: var(--text);
  text-decoration: none;
}
a.chip.active {
  color: var(--abyss);
}

/* Contrast fix: video cards are <a>, so don’t inherit cyan link color */
.video-card,
.video-card:visited,
.up-next-item,
.up-next-item:visited {
  color: var(--text);
  text-decoration: none;
}
.video-card .card-title,
.watch-title,
.up-next-item .card-title {
  color: var(--foam);
}
.video-card .card-meta,
.watch-layout .card-meta,
.description,
.player-shell {
  color: var(--text-muted);
}
.chip,
a.chip {
  color: var(--text);
}
.chip.active,
a.chip.active {
  color: #fff;
}
.video-card:hover .card-title,
.up-next-item:hover .card-title {
  color: var(--cyan);
}
