/* GalliBox Custom Premium CSS Styling System */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #09090b;
    --bg-secondary: #121214;
    --card-bg: rgba(24, 24, 27, 0.65);
    --border-color: rgba(255, 255, 255, 0.08);
    --primary: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.4);
    --secondary: #ec4899;
    --secondary-glow: rgba(236, 72, 153, 0.4);
    --success: #10b981;
    --warning: #f59e0b;
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.12) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(17, 24, 39, 0.8) 0px, transparent 100%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 40px 0 rgba(139, 92, 246, 0.1);
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    margin: 1rem 2rem;
    z-index: 10;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.05rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand i {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

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

.nav-link:hover, .nav-link.active {
    color: var(--text-main);
}

.btn-premium {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 14px var(--primary-glow);
    transition: all 0.3s;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
}

.btn-secondary-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 12px;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-secondary-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Main Container */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem 2rem 2rem 2rem;
}

/* Hero Section */
.hero-section {
    text-align: center;
    max-width: 800px;
    margin: 4rem auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 40%, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

/* Grid Layouts */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 1024px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

/* Landing Cards */
.selection-card {
    padding: 3rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.selection-icon {
    font-size: 4rem;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.selection-card:hover .selection-icon {
    transform: scale(1.1);
}

.selection-card.cafe:hover .selection-icon {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.selection-card.rest:hover .selection-icon {
    background: rgba(236, 72, 153, 0.15);
    border-color: var(--secondary);
    color: var(--secondary);
    box-shadow: 0 0 20px var(--secondary-glow);
}

/* Player Views */
.player-container {
    max-width: 900px;
    margin: 2rem auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.5rem;
}

@media (min-width: 768px) {
    .player-container {
        grid-template-columns: 1.2fr 1.8fr;
    }
}

.vinyl-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.vinyl-disc {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, #27272a 10%, #09090b 11%, #09090b 20%, #18181b 21%, #18181b 30%, #09090b 31%, #09090b 40%, #27272a 41%, #27272a 50%, #09090b 51%, #09090b 70%, #18181b 71%);
    border: 10px solid #2d2d30;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0,0,0,0.8);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vinyl-disc.playing {
    animation: spin 3.5s linear infinite;
}

.vinyl-center {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: 3px solid #09090b;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.vinyl-center i {
    color: white;
    font-size: 1.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.player-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
}

.channel-tag {
    align-self: flex-start;
    padding: 0.35rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

.channel-tag.cafe {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.channel-tag.restaurant {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.3);
}

.song-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.song-artist {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.progress-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.progress-bar-wrapper {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    position: relative;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    border-radius: 9999px;
    transition: width 0.1s linear;
}

.progress-time {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Audio Visualizer */
.visualizer-card {
    margin-top: 1.5rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.visualizer-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.visualizer-canvas {
    width: 100%;
    height: 100px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.25);
    display: block;
}

/* Tune In Panel overlay for Autoplay bypass */
.tune-in-overlay {
    position: absolute;
    inset: 0;
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(12px);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.tune-in-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.btn-tune-in {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border-radius: 50px;
}

/* Admin Dashboard Elements */
.admin-card {
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-box {
    padding: 1rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.stat-val {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-lbl {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    margin-top: 0.25rem;
}

/* Active Channels Grid */
.channels-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .channels-wrapper {
        grid-template-columns: 1fr 1fr;
    }
}

.channel-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.channel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.channel-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.channel-playback-controls {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
}

.btn-control {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.03);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-control:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.05);
}

.btn-control.playing-active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Queue List */
.queue-container {
    max-height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-right: 0.5rem;
}

.queue-item {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.queue-item-info {
    flex: 1;
    overflow: hidden;
}

.queue-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.queue-item-artist {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.btn-delete-small {
    background: transparent;
    border: none;
    color: #f87171;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-delete-small:hover {
    background: rgba(248, 113, 113, 0.1);
}

/* Upload Styles */
.dropzone {
    border: 2px dashed rgba(255,255,255,0.15);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    background: rgba(255,255,255,0.01);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
}

.dropzone i {
    font-size: 3rem;
    color: var(--primary);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.custom-table th, .custom-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.custom-table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.custom-table tbody tr:hover {
    background: rgba(255,255,255,0.01);
}

/* Audio Player HTML (Hidden) */
#audio-player {
    display: none;
}

/* Login Page */
.login-container {
    max-width: 450px;
    margin: 6rem auto;
    width: 100%;
    padding: 2.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-control {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Footer */
footer {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Notification badges */
.badge-online {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--success);
    font-weight: 600;
}

.badge-online::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
}

/* Mobile Responsive Styling (Uyumlu Mobil Tasarım) */
@media (max-width: 768px) {
    /* Global layout & spacing override */
    .main-content {
        padding: 0.5rem 1rem 1.5rem 1rem !important;
    }
    
    .navbar {
        flex-direction: column;
        gap: 1.2rem;
        margin: 0.5rem 1rem !important;
        padding: 1rem 1.2rem !important;
        text-align: center;
        border-radius: 12px;
    }
    
    .navbar-nav {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }
    
    .navbar-nav .nav-link {
        width: 100%;
        padding: 0.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .navbar-nav .btn-premium,
    .navbar-nav .btn-secondary-outline {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }
    
    /* Hero Section */
    .hero-section {
        margin: 2rem auto !important;
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 0.95rem !important;
        margin-bottom: 1.8rem;
    }
    
    /* Selection Cards (Home Grid) */
    .selection-card {
        padding: 1.5rem 1rem !important;
        gap: 1rem !important;
    }
    
    .selection-icon {
        width: 70px !important;
        height: 70px !important;
        font-size: 2.2rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .selection-card h2 {
        font-size: 1.25rem !important;
    }
    
    .selection-card p {
        font-size: 0.85rem !important;
    }
    
    /* Player Page Elements */
    .player-container {
        padding: 1.5rem !important;
        margin: 1rem auto !important;
        gap: 1.5rem !important;
        border-radius: 12px;
    }
    
    .vinyl-disc {
        width: 160px !important;
        height: 160px !important;
        border-width: 6px !important;
    }
    
    .vinyl-center {
        width: 50px !important;
        height: 50px !important;
    }
    
    .vinyl-center i {
        font-size: 1.1rem !important;
    }
    
    .player-details {
        text-align: center;
        gap: 1rem !important;
    }
    
    .player-details .channel-tag {
        align-self: center !important;
    }
    
    .song-title {
        font-size: 1.4rem !important;
    }
    
    .song-artist {
        font-size: 0.95rem !important;
    }
    
    /* Admin Section Headers */
    .admin-header {
        flex-direction: column;
        align-items: stretch !important;
        text-align: center;
        gap: 1.2rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .admin-header div[style*="display: flex"],
    .admin-header .btn-secondary-outline,
    .admin-header .btn-premium {
        flex-direction: column;
        width: 100%;
    }
    
    .admin-header .btn-secondary-outline,
    .admin-header .btn-premium {
        justify-content: center;
        padding: 0.8rem !important;
    }
    
    /* Stats & Info Cards */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .stat-box {
        padding: 0.8rem !important;
    }
    
    .stat-val {
        font-size: 1.5rem !important;
    }
    
    /* Admin and Glass Panels */
    .glass-panel {
        padding: 1.2rem !important;
        border-radius: 12px;
    }
    
    /* Tables & Forms */
    .custom-table th, .custom-table td {
        padding: 0.6rem !important;
        font-size: 0.85rem !important;
    }
    
    .form-control {
        padding: 0.7rem 0.9rem !important;
        font-size: 0.9rem !important;
    }
    
    /* Queue Modal & Dialogs */
    #queue-modal > .glass-panel,
    #password-modal > .glass-panel {
        padding: 1.2rem !important;
        margin: 0.75rem !important;
    }
    
    /* Action Buttons in tables */
    .btn-secondary-outline[style*="font-size: 0.8rem"] {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.75rem !important;
    }
    
    .btn-delete-small {
        padding: 0.4rem 0.5rem !important;
    }
}