/* =============================================
   UNIVERSITAS BANTEN MEETING - STYLE
   ============================================= */

/* Font Import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* Root Variables */
:root {
    --primary: #1a237e;
    --primary-dark: #0d1356;
    --primary-light: #3949ab;
    --secondary: #ff6f00;
    --accent: #ffab00;
    --success: #2e7d32;
    --danger: #c62828;
    --warning: #f57f17;
    --info: #0277bd;
    --dark: #1a1a2e;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-600: #6c757d;
    --gradient-1: linear-gradient(135deg, #1a237e 0%, #3949ab 50%, #5c6bc0 100%);
    --gradient-2: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    --shadow: 0 8px 32px rgba(26, 35, 126, 0.15);
    --shadow-lg: 0 16px 48px rgba(26, 35, 126, 0.2);
    --radius: 12px;
    --radius-lg: 20px;
}

/* Base Styles */
* {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f0f2f5;
    overflow-x: hidden;
}

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
    background: var(--gradient-2);
    padding: 12px 0;
    box-shadow: 0 2px 20px rgba(26, 35, 126, 0.2);
    z-index: 1000;
}

.navbar-brand {
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 16px !important;
    border-radius: 8px;
}

.navbar .nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1);
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero-section {
    background: var(--gradient-1);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    animation: heroGlow 8s ease-in-out infinite;
}

@keyframes heroGlow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(50px, 50px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-image-container {
    position: relative;
    animation: fadeInRight 1s ease;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-image-glow {
    position: absolute;
    top: 20%;
    left: 20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(255, 171, 0, 0.3), transparent);
    filter: blur(60px);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 1; }
}

.hero-image {
    position: relative;
    z-index: 1;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.hero-image:hover {
    transform: scale(1.02);
}

.floating-card {
    position: absolute;
    background: white;
    padding: 10px 16px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    font-size: 14px;
    font-weight: 600;
    animation: float 3s ease-in-out infinite;
    z-index: 2;
}

.card-1 {
    top: 10%;
    right: -10%;
    animation-delay: 0s;
}

.card-2 {
    bottom: 20%;
    left: -10%;
    animation-delay: 1s;
}

.card-3 {
    bottom: 5%;
    right: 5%;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

/* =============================================
   FEATURES SECTION
   ============================================= */
.feature-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-1);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.feature-item {
    transition: all 0.3s ease;
    border-radius: var(--radius-lg);
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.feature-item:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

/* =============================================
   AUTH PAGES (Login & Register)
   ============================================= */
.auth-body {
    background: var(--gradient-1);
    min-height: 100vh;
}

.auth-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card .form-control {
    padding: 12px 16px;
    border-radius: 10px;
    border: 2px solid var(--gray-200);
    font-size: 14px;
    transition: all 0.3s ease;
}

.auth-card .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(26, 35, 126, 0.1);
}

.auth-card .input-group-text {
    background: var(--gray-100);
    border: 2px solid var(--gray-200);
    border-right: none;
    border-radius: 10px 0 0 10px;
    color: var(--primary);
}

.toggle-password {
    border: 2px solid var(--gray-200) !important;
    border-left: none !important;
    border-radius: 0 10px 10px 0 !important;
}

/* =============================================
   DASHBOARD
   ============================================= */
.card {
    border-radius: var(--radius);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow);
}

/* =============================================
   MEETING ROOM
   ============================================= */
.meeting-body {
    background: #1a1a2e;
    height: 100vh;
    overflow: hidden;
}

.meeting-top-bar {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.meeting-container {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 80px;
    padding: 10px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 8px;
    height: 100%;
    overflow-y: auto;
    padding: 5px;
}

.video-container {
    position: relative;
    background: #2a2a3e;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.video-container.speaking {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(255, 171, 0, 0.3);
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.participant-name {
    color: white;
    font-size: 12px;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.video-status {
    display: flex;
    gap: 6px;
}

.video-status span {
    background: rgba(0, 0, 0, 0.5);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 11px;
    color: white;
}

.video-placeholder {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #2a2a3e;
}

.avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

/* Meeting Controls */
.meeting-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    padding: 15px;
    z-index: 100;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.controls-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn.btn-danger {
    background: var(--danger);
}

.control-btn.btn-danger:hover {
    background: #e53935;
}

.control-btn.is-off {
    background: var(--danger);
    color: white;
}

.control-btn.is-off:hover {
    background: #e53935;
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 10px;
    padding: 2px 5px;
    min-width: 18px;
}

/* Side Panel */
.side-panel {
    background: #1e1e32;
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel-header {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.chat-message {
    margin-bottom: 12px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-message .message-user {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 4px;
}

.chat-message .message-text {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: white;
    word-wrap: break-word;
}

.chat-message .message-time {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

.chat-input {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-input .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px;
}

.chat-input .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.chat-input .btn {
    border-radius: 8px;
}

/* Participants List */
.participants-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.participant-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.participant-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.participant-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.participant-info {
    flex: 1;
    min-width: 0;
}

.participant-name-text {
    font-size: 13px;
    font-weight: 500;
}

.participant-status {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

/* Toast Notification */
.toast {
    background: #1e1e32;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Timer */
#timerDisplay {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content {
        text-align: center;
        padding-top: 80px;
    }
    
    .hero-content .d-flex {
        justify-content: center;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .side-panel {
        position: fixed;
        top: 56px;
        right: 0;
        bottom: 80px;
        width: 300px;
        z-index: 90;
        display: none;
    }
    
    .side-panel.show {
        display: flex;
    }
    
    .control-btn {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes shake {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.hand-raised {
    animation: shake 0.5s ease-in-out;
}

/* =============================================
   LOADING
   ============================================= */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
