/* Yushikan Goju-Ryu – Warm Light Theme (Fully Cleaned & Modernized) */
:root {
    --bg: #f5f0e6;
    --accent-red: #a21d1d;
    --text: #1c1c1c;
    --text-light: #3a3a3a;
    --nav-border: #8c5a2b;
    --highlight: #d4af37;
}

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

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.75;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    background-color: var(--bg);
    padding: 18px 5%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    z-index: 1000;
}

.logo { height: 58px; width: auto; transition: transform 0.3s ease; }
.logo:hover { transform: scale(1.04); }

.nav-links {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 1.05rem;
}

.nav-item {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    padding: 6px 0;
    position: relative;
    transition: color 0.3s ease;
}
.nav-item:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-red);
    transition: width 0.3s ease;
}
.nav-item:hover { color: var(--accent-red); }
.nav-item:hover:after { width: 100%; }

.auth-box { display: flex; gap: 12px; margin-left: auto; }

.small-button {
    background: linear-gradient(90deg, var(--accent-red), #c94a4a);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(162,29,29,0.2);
}
.small-button:hover {
    background: linear-gradient(90deg, #c94a4a, var(--accent-red));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(162,29,29,0.3);
}

/* Content */
.content {
    flex: 1;
    max-width: 1140px;
    margin: 55px auto 90px;
    padding: 0 35px;
    text-align: center;
}

.content-wide {
    flex: 1;
    max-width: 1920px;
    margin: 55px auto 90px;
    padding: 0 5%;
    width: 100%;
    text-align: left;
}

.hero { margin-bottom: 65px; }
.big-logo { height: 192px; width: auto; margin-bottom: 28px; filter: drop-shadow(0 10px 25px rgba(0,0,0,0.12)); transition: transform 0.4s ease; }
.big-logo:hover { transform: scale(1.03); }

h1, h2, h3, h4 { color: var(--text); margin-bottom: 18px; }
h1 { font-size: 2.65rem; }
h2 { font-size: 2.15rem; margin-top: 55px; }

.tagline { font-size: 1.38rem; color: var(--text-light); margin-bottom: 52px; max-width: 720px; margin-left: auto; margin-right: auto; line-height: 1.55; font-weight: 400; }

/* Forms */
.registration-form {
    max-width: 620px;
    margin: 0 auto;
    background: white;
    padding: 48px 42px;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.reg-form-group { display: flex; justify-content: center; align-items: center; margin-bottom: 24px; width: 100%; }
.reg-label { width: 35%; text-align: right; margin-right: 26px; font-weight: 600; }
.reg-styled-input,
.reg-styled-textarea {
    width: 65%;
    padding: 14px 18px;
    border: 2px solid #d4c9b0;
    border-radius: 8px;
    font-size: 1.05rem;
}
.reg-styled-input:focus,
.reg-styled-textarea:focus {
    outline: none;
    border-color: var(--accent-red);
    box-shadow: 0 0 0 4px rgba(162,29,29,0.18);
}

input[type="submit"] {
    width: 45%;
    padding: 16px;
    background: linear-gradient(90deg, var(--accent-red), #c94a4a);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.12rem;
    font-weight: 600;
    margin-top: 20px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 40px 0;
    background: white;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    border-radius: 10px;
    overflow: hidden;
}

th, td {
    padding: 16px 14px;
    text-align: left;
    border-bottom: 1px solid #e8e0d0;
}

th {
    background-color: var(--accent-red);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

tbody tr:nth-child(even) { background-color: #f9f5eb; }
tbody tr:hover { background-color: #f0e6d2; transform: scale(1.01); transition: all 0.2s ease; }

/* Footer */
footer {
    background-color: var(--bg);
    padding: 42px 5%;
    text-align: center;
    border-top: 4px solid var(--accent-red);
    margin-top: auto;
    color: var(--text-light);
    font-size: 1.02rem;
    line-height: 1.6;
}

/* === Training Videos Page === */
.video-page .container { max-width: 100%; margin: 0 auto; padding: 25px 60px; }
.video-flex { display: flex; gap: 3.5rem; flex-wrap: wrap; align-items: flex-start; max-width: 1920px; margin: 0 auto; }
.player-main { flex: 3.2; min-width: 320px; }
.video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); background: #000; }
.video-wrapper video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; }
.playlist-sidebar { flex: 1; min-width: 300px; max-width: 380px; background: #f8f4eb; border: 1px solid #e6d9b8; border-radius: 8px; padding: 1rem; height: fit-content; position: sticky; top: 20px; }
#nowPlayingTitle { margin: 0 0 1rem 0; color: #333; font-size: 1.4rem; }
.video-details { margin-top: 1.5rem; padding: 1.5rem; background: white; border-radius: 8px; border: 1px solid #e6d9b8; }
#searchInput { width: 100%; padding: 12px; margin-bottom: 1rem; border: 1px solid #cc1414; border-radius: 6px; font-size: 1rem; }
#searchList { list-style: none; padding: 0; margin: 0; max-height: 580px; overflow-y: auto; }
#searchList li { padding: 12px 16px; cursor: pointer; border-bottom: 1px solid #eee; transition: all 0.2s; }
#searchList li:hover, #searchList li.active { background: #cc1414; color: white; border-radius: 4px; }
#searchList li:last-child { border-bottom: none; }

/* === Admin Pages === */
.success-msg {
    background: #d4edda;
    color: #155724;
    padding: 14px 20px;
    border-radius: 8px;
    margin: 25px auto;
    max-width: 620px;
    text-align: center;
    font-weight: 500;
    border: 1px solid #c3e6cb;
}

.admin-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    padding: 40px 35px;
    margin: 40px auto;
    max-width: 1180px;
    border: 1px solid #e8e0d0;
}
.admin-card h2 {
    text-align: center;
    margin-bottom: 35px;
    color: var(--accent-red);
    font-size: 2.1rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: white;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    border-radius: 12px;
    overflow: hidden;
}
.admin-table th {
    background: var(--accent-red);
    color: white;
    padding: 18px 16px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 0.6px;
}
.admin-table td { padding: 16px 16px; border-bottom: 1px solid #e8e0d0; }
.admin-table tbody tr:hover { background-color: #f9f5eb; }

.admin-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.action-cell { text-align: center; white-space: nowrap; padding: 16px 12px; }
.search-flex {
    display: flex;
    gap: 12px;
    max-width: 580px;
    margin: 30px auto;
    flex-wrap: wrap;
    justify-content: center;
}
.search-flex .reg-styled-input { flex: 1; min-width: 260px; }

.modal-message {
    font-size: 1.2rem;
    margin-bottom: 25px;
    color: #333;
    font-weight: 500;
}
.modal-buttons {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-top: 28px;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.78);
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-content {
    background-color: white;
    margin: 7% auto;
    padding: 42px 38px;
    border-radius: 14px;
    width: 92%;
    max-width: 540px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    position: relative;
    animation: slideUp 0.4s ease;
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-content .reg-form-group { margin-bottom: 22px; }
.modal-content .reg-label { width: 36%; margin-right: 22px; font-size: 1.02rem; }
.modal-content .reg-styled-input,
.modal-content .reg-styled-textarea { width: 64%; padding: 14px 18px; }

/* Full-width override for Training Videos */
main.full-width { max-width: none !important; margin: 20px auto 40px !important; padding: 0 40px !important; }
.video-page .container { max-width: none; padding: 0; }

/* MOBILE – Single consolidated media query */
@media (max-width: 768px) {
    .navbar { flex-direction: column; padding: 18px 5%; gap: 16px; }
    .nav-links { gap: 20px; font-size: 1.1rem; }
    .auth-box { margin-left: 0; width: 100%; justify-content: center; }
    .content { padding: 0 15px; margin: 30px auto 60px; }
    .big-logo { height: 148px; }
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.85rem; }
    .registration-form { padding: 38px 25px; }
    .reg-label { width: 40%; font-size: 1rem; }
    .admin-card { padding: 25px 18px; margin: 20px 10px; }
    .admin-card h2 { font-size: 1.8rem; }
    .search-flex { flex-direction: column; align-items: stretch; gap: 10px; }
    .admin-table { font-size: 0.9rem; }
    .admin-table th, .admin-table td { padding: 12px 8px; white-space: nowrap; }
    .admin-table-wrapper { margin: 0 -15px; padding: 0 15px; }
    .action-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; }
    .action-cell .small-button { width: 100%; max-width: 140px; padding: 12px 16px; font-size: 1rem; }
    /* Video page mobile */
    .video-flex { flex-direction: column; gap: 1.5rem; }
    .player-main { order: 1; }
    .playlist-sidebar { order: 2; position: static; width: 100%; }
    #searchList li { padding: 14px 18px; font-size: 1.05rem; }
    #searchList li.active { background: #a21d1d; color: white; font-weight: 600; }
}