@font-face {
    font-family: 'TW Cen MT';
    src: url('fonts/fontscorecomttwcenmt.eot');
    src: local('fontscorecomttwcenmt'), url('fonts/fontscorecomttwcenmt.woff') format('woff'), url('fonts/fontscorecomttwcenmt.ttf') format('truetype');
}

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

body {
    background: #1B3C28;
    color: #ffffff;
    font-family: 'TW Cen MT', sans-serif;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.667em;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    border: 0;
    vertical-align: middle;
}

a {
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover, a:focus {
    text-decoration: none;
    opacity: 0.85;
}

/* ============ TOP BORDER (Gold Ornamental Strip) ============ */
.top-border {
    background: url('img/top-border.png') repeat-x center;
    background-size: auto 100%;
    height: 38px;
    width: 100%;
    flex-shrink: 0;
}

/* ============ LAYOUT ============ */
.page-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.wrapper {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0;
    text-align: center;
    width: 100%;
}

.container {
    max-width: 1170px;
    margin: 0 auto;
}

body.login .wrapper,
body.listing .wrapper {
    margin-bottom: 0;
    padding: 3vh 15px;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.clearfix { clear: both; }
.hidden { display: none; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }

/* ============ LOGO ============ */
.av-logo {
    display: block;
    text-align: center;
    padding: 25px 15px 10px;
}

.av-logo img {
    max-width: 320px;
    width: 80%;
    height: auto;
}

.av-logo-text {
    font-family: 'TW Cen MT', sans-serif;
    font-size: 0.9em;
    color: #ffffff;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 2px;
}

/* ============ LOGIN PAGE TITLE ============ */
.title {
    color: #ffffff;
    display: block;
    font-family: 'TW Cen MT', sans-serif;
    font-size: 2.2em;
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1.4em;
    text-transform: uppercase;
    position: relative;
    margin: 15px auto 25px;
}

.title:before {
    display: none;
}

/* ============ LOGIN FORM ============ */
#loginForm {
    max-width: 400px;
    margin: 0 auto;
}

.panel {
    margin-bottom: 0;
    background-color: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.panel-default {
    border: none !important;
    border-radius: 0 !important;
}

.panel-login {
    display: none;
}

.panel-body {
    padding: 0;
    background-color: transparent;
    border: none;
}

.form-field {
    font-family: 'TW Cen MT', sans-serif;
    margin-bottom: 15px;
}

.form-field input[type="text"],
.form-field input[type="password"] {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'TW Cen MT', sans-serif;
    font-size: 1.1em;
    padding: 14px 16px;
    width: 100%;
    background: #ffffff;
    color: #333;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-field input[type="text"]:focus,
.form-field input[type="password"]:focus {
    border-color: #d4a843;
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.15);
}

.form-field input[type="text"]::placeholder,
.form-field input[type="password"]::placeholder {
    color: #999;
}

/* Login Button - Golden/Yellow */
.form-field .button,
.form-field input[type="submit"] {
    background: #d4a843;
    border: none;
    border-radius: 8px;
    color: #1a1a1a;
    cursor: pointer;
    font-family: 'TW Cen MT', sans-serif;
    font-weight: 700;
    font-size: 1.3em;
    padding: 14px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    max-width: 100%;
    width: 100%;
    display: block;
    margin: 10px auto 0;
    letter-spacing: 2px;
    box-shadow: 0 4px 15px rgba(212, 168, 67, 0.3);
}

.form-field .button:before,
.form-field .button:after {
    display: none;
}

.form-field .button:hover,
.form-field .button:focus,
.form-field input[type="submit"]:hover,
.form-field input[type="submit"]:focus {
    background: #c49a38;
    color: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(212, 168, 67, 0.4);
}

/* Forgot Password */
.forgot-password {
    text-align: center;
    margin-top: 12px;
}

.forgot-password a {
    color: #ffffff;
    font-size: 1.1em;
    text-decoration: underline;
    font-family: 'TW Cen MT', sans-serif;
}

.forgot-password a:hover {
    color: #d4a843;
}

/* ============ LOGIN PAGE IMAGE (Calligraphy) ============ */
.login-hero-image {
    text-align: center;
    padding: 20px 15px 0;
}

.login-hero-image img {
    max-width: 500px;
    width: 85%;
    height: auto;
}

/* ============ INSTRUCTIONS PANEL ============ */
.panel.panel-default {
    background: transparent;
    border: none !important;
}

body.login .panel-login,
body.login .instructions-header {
    display: block;
    background: rgba(255,255,255,0.1) !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    color: #fff !important;
    padding: 12px 18px;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    border-radius: 8px 8px 0 0;
}

body.login .panel-body {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 15px 20px;
    color: #e0e0e0;
}

body.login .panel-body .form-field {
    color: #e0e0e0;
    font-size: 1.1em;
}

body.login .panel-body ol li {
    margin-bottom: 6px;
    color: #d0d0d0;
}

/* ============ DASHBOARD - TOP BAR ============ */
.dashboard-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #ffffff;
    width: 100%;
}

.dashboard-topbar .av-logo-text {
    color: #1B3C28;
    font-size: 1em;
}

.its_login {
    background: #ffffff;
    border-radius: 8px;
    font-family: 'TW Cen MT', sans-serif;
    font-size: 1em;
    padding: 8px 15px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.its_login #id {
    color: #1B3C28;
    font-weight: 600;
}

.its_login .btn {
    background: #a01030;
    border: none;
    border-radius: 6px;
    font-family: 'TW Cen MT', sans-serif;
    font-size: 0.95em;
    padding: 8px 20px;
    text-transform: uppercase;
    color: #fff;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.its_login .btn:hover {
    background: #8a0d28;
    color: #fff;
}

.its_login .btn-report {
    background: #1B3C28;
    border: 2px solid #1B3C28;
}

.its_login .btn-report:hover {
    background: #153222;
}

/* ============ DASHBOARD HERO ============ */
.dashboard-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 15px;
    text-align: center;
}

.dashboard-hero img {
    max-width: 420px;
    width: 60%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* ============ SERVER BUTTONS ============ */
.server-list {
    list-style: none;
    margin-bottom: 1em;
    padding: 0;
}

.server-list li {
    display: inline-block;
}

.server-list li a {
    font-size: 1.3em;
    background: #ffffff;
    border: 2px solid #d4a843;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border-radius: 50px;
    color: #1B3C28;
    display: block;
    position: relative;
    font-family: 'TW Cen MT', sans-serif;
    font-weight: 600;
    padding: 0.5em 1.2em;
    margin: 0.4em;
    transition: all 0.3s ease;
    cursor: pointer;
}

.server-list li a.selected,
.server-list li a:hover,
.server-list li a:focus {
    background: #d4a843;
    color: #1a1a1a;
    border-color: #d4a843;
    box-shadow: 0 4px 15px rgba(212,168,67,0.4);
}

/* ============ MIQAAT BUTTON ============ */
.button {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    color: #ffffff;
    font-family: 'TW Cen MT', sans-serif;
    font-size: 1.6em;
    font-weight: 400;
    display: block;
    margin: 1em auto;
    padding: 1em 1.5em;
    position: relative;
    max-width: 90%;
    text-align: center;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border-radius: 12px;
}

.button:before,
.button:after {
    display: none;
}

.button:hover {
    background: rgba(255,255,255,0.15);
    border-color: #d4a843;
}

.button a {
    color: #ffffff;
    box-shadow: none;
}

.button.btn-waaz a {
    color: #ffffff;
}

/* ============ QUICK INSTRUCTIONS PANEL ============ */
.quick-instruction-panel {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 20px;
    max-width: 450px;
    margin: 20px auto;
    text-align: left;
    color: #e0e0e0;
    font-family: 'TW Cen MT', sans-serif;
}

.panel-title {
    font-size: 1.4em;
    color: #d4a843;
    margin-bottom: 15px;
    text-align: center;
}

.instruction-list {
    list-style-type: none;
    padding: 0;
}

.instruction-list li {
    margin: 10px 0;
    font-size: 1.2em;
    color: #d0d0d0;
}

.instruction-list li strong {
    font-weight: bold;
    color: #d4a843;
}

.instruction-list li em {
    color: #a8d8a8;
}

.quick-instruction-panel .instruction-list li {
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 6px;
}

.quick-instruction-panel .instruction-list li:hover {
    background: rgba(255,255,255,0.06);
    padding-left: 18px;
    border-left: 3px solid #d4a843;
}

/* ============ FOOTER ============ */
.info {
    background: #1B3C28;
    padding: 0;
    margin-top: auto;
}

.bottom-border {
    background: url('img/footer-border.png') repeat-x center;
    background-size: auto 100%;
    height: 50px;
    margin: 0;
}

.copy {
    color: #ffffff;
    padding: 10px 0 5px;
    text-align: center;
    font-size: 0.95em;
    opacity: 0.8;
}

.copy a {
    color: #fff;
    text-decoration: none;
}


/* ============ DESKTOP LAYOUT (2 columns for login) ============ */
.login-layout {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 38px - 80px);
    padding: 30px 20px;
    gap: 20px;
}

.login-left {
    flex: 0 0 420px;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    padding: 0 20px;
}

.login-left .av-logo {
    text-align: left;
    padding: 0;
    margin-bottom: 18px;
}

.login-left .av-logo img {
    max-width: 240px;
    width: 100%;
    height: auto;
}

.login-left .title {
    text-align: left;
    font-size: 1.6em;
    padding: 0;
    margin: 0 0 18px 0;
}

.login-left #loginForm {
    width: 100%;
    margin: 0;
    padding: 25px 20px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
}

.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-right img {
    max-width: 600px;
    width: 100%;
    height: auto;
}

/* ============ OFFLINE ALERT ============ */
#offline-alert {
    font-family: 'TW Cen MT', sans-serif;
}

/* ============ MEDIA QUERIES ============ */
@media only screen and (max-width: 767px) {
    body { font-size: 13px; }

    .login-layout {
        flex-direction: column;
        padding: 10px;
        min-height: auto;
    }

    .login-left {
        max-width: 100%;
        padding: 15px;
        text-align: center;
        align-items: center;
        justify-content: flex-start;
    }

    .login-left .av-logo {
        text-align: center;
    }

    .login-left .title {
        text-align: center;
        font-size: 1.7em;
    }

    .login-right {
        padding: 10px 15px 20px;
    }

    .login-right img {
        max-width: 350px;
        width: 90%;
    }

    #loginForm {
        max-width: 100%;
        padding: 0 15px;
    }

    .wrapper {
        padding: 3vh 10px;
    }

    .av-logo img {
        max-width: 250px;
    }

    .title {
        font-size: 1.6em;
    }

    .button {
        max-width: 95%;
        font-size: 1.2em;
        padding: 1em;
    }

    .dashboard-topbar {
        flex-direction: column;
        gap: 8px;
        padding: 10px;
    }

    .its_login {
        gap: 8px;
    }

    .dashboard-hero img {
        width: 90%;
    }

    .quick-instruction-panel {
        max-width: 95%;
    }

    iframe {
        width: 100%;
        height: 100%;
    }

    #player {
        width: 100%;
        height: 100%;
    }

    .server-list li a {
        font-size: 1.1em;
        padding: 0.4em 0.9em;
    }
}

@media only screen and (max-width: 980px) and (min-width: 768px) {
    .login-layout {
        flex-direction: column;
        padding: 15px;
    }

    .login-left {
        text-align: center;
        max-width: 100%;
    }

    .login-left .av-logo {
        text-align: center;
    }

    .login-left .title {
        text-align: center;
    }

    #loginForm {
        max-width: 60%;
    }
}

/* ============ PLYR OVERRIDES ============ */
.plyr {
    --plyr-color-main: #d4a843;
    --plyr-control-bg: #1B3C28;
}

.plyr--video .plyr__video-wrapper,
.plyr--video .plyr__poster,
.plyr--video .plyr__video-embed iframe {
    display: none !important;
    height: 0 !important;
}

.plyr--video {
    background: #1B3C28 url('img/footer-bg-jaali.png') !important;
    border-radius: 12px;
    padding: 5px;
    min-height: auto !important;
    aspect-ratio: auto !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.plyr__controls {
    background: transparent !important;
    color: #fff !important;
    padding: 10px !important;
}

.plyr--video .plyr__control.plyr__tab-focus,
.plyr--video .plyr__control:hover,
.plyr--video .plyr__control[aria-expanded=true] {
    background: #d4a843 !important;
}

.plyr__progress__container input[type=range] {
    color: #d4a843 !important;
}

/* ============ YOUTUBE AUDIO ============ */
#youtube-audio {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    background: #1B3C28;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#youtube-audio img {
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: transform 0.3s ease;
    align-self: baseline;
}

#youtube-audio img:hover {
    transform: scale(1.1);
}

@media only screen and (max-width: 767px) {
    #youtube-audio {
        padding: 10px;
    }
    #youtube-audio img {
        width: 40px;
        height: 40px;
    }
    #youtube-player {
        display: none;
    }
}

/* ============ ANNOUNCEMENT STYLES ============ */
.announcement-container {
    max-width: 1170px;
    margin: 20px auto;
    padding: 0 15px;
}

.announcement-bar {
    padding: 15px 25px;
    border-radius: 12px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 1.1em;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    animation: slideInDown 0.5s ease-out;
}

.announcement-info { background: #e0f2fe; color: #0369a1; border-left: 5px solid #0ea5e9; }
.announcement-warning { background: #fef3c7; color: #92400e; border-left: 5px solid #f59e0b; }
.announcement-danger { background: #fee2e2; color: #991b1b; border-left: 5px solid #ef4444; }
.announcement-success { background: #dcfce7; color: #166534; border-left: 5px solid #22c55e; }

@keyframes slideInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============ UTILITY (legacy compat) ============ */
ul li { list-style-type: none; text-align: left; padding: 0 5px; }
.row { margin-left: 0; margin-right: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }