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

body {
    font-family: 'Montserrat', Arial, sans-serif;
    background-color: #f5f5f5;
    line-height: 1.6;
    color: #333;
    padding-top: 90px;
}

:root {
    --primary: #ff6700;
    --orange: #ffb38a;
    --bg: #f8f9fa;
    --white: #fff;
    --shadow: 0 2px 12px #ff670003;
}

/* NAVBAR */
.funlearn-navbar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-bottom: 2.5px solid #ffe8d8;
    padding: 0 2vw;
    height: 64px;
    box-shadow: var(--shadow);
    z-index: 100;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
}
.funlearn-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    z-index: 10;
}
.funlearn-logo {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    margin-right: 7px;
    box-shadow: 0 2px 12px #ffd7b545;
}
.funlearn-navbar-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1px;
    user-select: none;
}

/* Hamburger menu toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 101;
}
.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 27px;
    height: 20px;
}
.hamburger-icon span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--primary);
    border-radius: 3px;
    transition: all 0.2s;
}
.mobile-menu-toggle.active .hamburger-icon span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}
.mobile-menu-toggle.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.active .hamburger-icon span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}
.funlearn-navbar-links {
    display: flex;
    gap: 36px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    background: none;
    position: static;
    box-shadow: none;
    border: none;
    transition: none;
}
.funlearn-navbar-links li a {
    font-size: 1.09rem;
    color: #444;
    font-weight: 500;
    text-decoration: none;
    opacity: 0.87;
    transition: color 0.17s;
    position: relative;
    padding: 4px 0;
}
.funlearn-navbar-links li a.active,
.funlearn-navbar-links li a:hover {
    color: var(--primary);
    opacity: 1;
}
.underline-anim {
    display: inline-block;
    position: relative;
}
.underline-anim::after {
    content: '';
    display: block;
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--orange), var(--primary) 70%);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.25s cubic-bezier(.77,0,.18,1);
    transform-origin: left;
}
.underline-anim:hover::after, 
.underline-anim:focus::after, 
.underline-anim.active::after {
    transform: scaleX(1);
}

@media (max-width: 900px) {
    .mobile-menu-toggle { display: block; }
    .funlearn-navbar-links {
        position: absolute;
        top: 64px;
        right: 0;
        left: 0;
        background: #fff;
        flex-direction: column;
        gap: 0;
        width: 100%;
        display: none;
        border-bottom: 2.5px solid #ffe8d8;
        box-shadow: 0 2px 12px #ff670027;
        z-index: 99;
        align-items: flex-start;
        padding-left: 0;
    }
    .funlearn-navbar-links.show {
        display: flex;
    }
    .funlearn-navbar-links li {
        width: 100%;
        border-bottom: 1px solid #faf1e8;
        padding-left: 2vw;
    }
    .funlearn-navbar-links li:last-child { border-bottom: none; }
    .funlearn-navbar-links li a {
        display: block;
        width: 100%;
        padding: 16px 0;
        text-align: left;
    }
}

/* HEADER & TICKER */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
header h1 {
    font-size: 2rem;
    font-weight: bold;
    font-family: 'Orbitron', Arial, sans-serif;
}
.news-ticker {
    width: 100%;
    background-color: #f0f0f0;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    overflow: hidden;
    height: 40px;
    position: relative;
}
.ticker-content {
    display: inline-block;
    white-space: nowrap;
    animation: ticker 6s linear infinite;
    position: absolute;
    padding: 0 100%;
}
.ticker-content span {
    display: inline-block;
    font-family: 'Orbitron', Arial, sans-serif;
    font-weight: bold;
    color: var(--primary);
    font-size: 1.2rem;
    padding: 8px 0;
    text-transform: uppercase;
}
@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* LAYOUT */
.main-content {
    display: flex;
    min-height: calc(100vh - 120px);
    padding: 20px;
    gap: 20px;
    max-width: 1600px;
    margin: 0 auto;
    flex-direction: row;
    justify-content: center;
}
.video-section {
    width: 70%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}
.judge-row {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 20px;
    width: 100%;
}
.judge-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 370px;
    min-width: 280px;
}
.lawyers-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    width: 100%;
}
.lawyer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 370px;
    min-width: 220px;
}
.video-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background-color: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    animation: fadeIn 0.3s ease-in;
    width: 100%;
    max-width: 370px;
}
.window-label {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.2rem;
    padding: 5px 0;
    text-align: center;
}
.video-window {
    position: relative;
    width: 260px;
    height: 180px;
    background-color: #f8f9fa;
    border: 2px solid #2c3e50;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}
.video-window video { display: none; width: 100%; height: 100%; object-fit: cover; }
.video-window img { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-active video { display: block; }
.video-active img { display: none; }
.text-box {
    width: 260px;
    height: 50px;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: white;
    resize: none;
    font-size: 0.9rem;
    line-height: 1.5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
}

/* FORM SECTION & COLLAPSIBLE */
.form-section {
    width: 30%;
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    height: fit-content;
    min-width: 280px;
}
.case-settings-heading {
    font-size: 1.35rem;
    font-family: 'Orbitron', Arial, sans-serif;
    margin-bottom: 1.2rem;
    color: #2c3e50;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.collapsible-btn {
    display: none;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    font-size: 1.3rem;
    font-family: 'Orbitron', Arial, sans-serif;
    color: #2c3e50;
    padding: 0.7rem 0;
    cursor: pointer;
}
.collapse-arrow {
    font-size: 1.2rem;
    margin-left: 10px;
    transition: transform 0.2s;
}
.collapsible-content {
    display: block;
    width: 100%;
    padding: 0;
    margin-top: 0.5rem;
}
.collapsible-content.show {
    display: block;
    animation: fadeIn 0.2s;
}
@media (max-width: 900px) {
    .main-content {

          .case-settings-heading {
    display: none;
  }
        flex-direction: column;
        padding: 10px;
        gap: 12px;
    }
    .video-section {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 14px;
        align-items: center;
    }
    .judge-row {
        margin-bottom: 10px;
    }
    .lawyers-row {
        display: flex;
        flex-direction: row;
        gap: 8px;
        justify-content: center;
        align-items: flex-start;
        width: 100%;
    }
    .judge-container, .lawyer-container, .video-container {
        width: 45vw;
        max-width: 140px;
        min-width: 90px;
        padding: 7px;
    }
    .video-window {
        width: 90px;
        height: 65px;
        margin-bottom: 3px;
        border-radius: 6px;
    }
    .text-box {
        width: 90px;
        height: 30px;
        padding: 4px;
        font-size: 0.68rem;
        border-radius: 6px;
    }
    .form-section {
        width: 100%;
        min-width: unset;
        margin: 0 auto;
        padding: 0.5rem;
        border-radius: 0;
        box-shadow: none;
    }
    .collapsible-btn {
        display: flex;
    }
    .collapsible-content {
        display: none;
        width: 100%;
        padding: 0;
        margin-top: 0.5rem;
    }
    .collapsible-content.show {
        display: block;
        animation: fadeIn 0.2s;
    }
}
@media (min-width: 901px) {
      .case-settings-heading {
    display: block;
  }
    .collapsible-btn { display: none !important; }
    .collapsible-content { display: block !important; }
}
.radio-group, .radio-group.vertical, .form-group, .form-section, .settings-content-desktop, .collapsible-content {
    align-items: flex-start !important;
    text-align: left !important;
}
.radio-group { flex-direction: row; }
.radio-group.vertical { flex-direction: column; gap: 0.7em; }
.radio-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    gap: 0.6em;
    margin-bottom: 0;
    position: relative;
    user-select: none;
}
.radio-label input[type="radio"] {
    appearance: none;
    margin: 0;
    width: 1.15em;
    height: 1.15em;
    border: 2px solid #bbb;
    border-radius: 50%;
    background: #fff;
    outline: none;
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
    position: relative;
    transition: border 0.2s;
}
.radio-label input[type="radio"]:checked {
    border-color: var(--primary);
    background: #fff;
}
.radio-label .custom-radio {
    width: 1.15em;
    height: 1.15em;
    border: 2px solid #bbb;
    border-radius: 50%;
    background: #fff;
    margin-right: 0.7em;
    margin-left: 0;
    position: relative;
    display: inline-block;
    vertical-align: middle;
    transition: border 0.2s;
}
.radio-label input[type="radio"]:checked + .custom-radio {
    border-color: var(--primary);
}
.radio-label input[type="radio"]:checked + .custom-radio:after {
    content: '';
    display: block;
    position: absolute;
    left: 0.3em;
    top: 0.3em;
    width: 0.45em;
    height: 0.45em;
    border-radius: 50%;
    background: var(--primary);
}
.radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
}
.radio-label .custom-radio { margin-right: 0.7em; }
input[type="text"]#co-id-input {
    font-size: 1rem;
    padding: 0.6em 1em;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-top: 0.2em;
}
.form-group {
    margin-bottom: 1.5rem;
    width: 100%;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #444;
}
select,
input[type="date"],
input[type="text"] {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.95rem;
    background-color: white;
    transition: border-color 0.2s;
}
select:focus,
input[type="date"]:focus,
input[type="text"]:focus {
    border-color: #2c3e50;
    outline: none;
    box-shadow: 0 0 0 2px rgba(44,62,80,0.1);
}
.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    flex: 1;
    transition: all 0.3s;
    font-family: 'Montserrat', Arial, sans-serif;
}
.btn.primary {
    background-color: #2c3e50;
    color: white;
}
.btn.secondary {
    background-color: #95a5a6;
    color: white;
}
.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.btn:active {
    transform: translateY(0);
}
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.file-upload {
    border: 2px dashed #dee2e6;
    padding: 1.5rem;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    background-color: #f8f9fa;
}
.file-upload:hover,
.file-upload.highlight {
    border-color: #2c3e50;
    background-color: #f1f3f5;
}
.file-upload input[type="file"] {
    display: none;
}
.file-upload p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}
@keyframes fadeIn {
    from { opacity: 0;}
    to { opacity: 1;}
}
:focus {
    outline: 2px solid #2c3e50;
    outline-offset: 2px;
}
.error {
    border-color: #dc3545 !important;
}
.error-message {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}