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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Styling for general links (like on auth pages) */
body a {
    color: #3498db; /* A common link blue */
    text-decoration: none;
}

body a:hover {
    text-decoration: underline;
}

body a:visited {
    color: #3498db; /* Keep visited links the same color as unvisited */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

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

h1, h2 {
    color: #1DB954;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #1DB954;
}

nav a {
    margin-left: 20px;
    color: #333 !important; /* Force override of general link style */
    text-decoration: none;
    font-weight: 500;
}

nav a:hover {
    color: #1DB954 !important;
    text-decoration: none !important;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: #1DB954;
    color: white !important; /* Ensure button text is white */
    text-decoration: none;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn:hover {
    background: #1ed760;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(29, 185, 84, 0.3);
    text-decoration: none !important;
}

.btn-secondary {
    background: #666;
}

.btn-secondary:hover {
    background: #888;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #1DB954;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fee;
    color: #c00;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #0a0;
    border: 1px solid #cfc;
}

.alert-info {
    background: #eef;
    color: #00a;
    border: 1px solid #ccf;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: #f8f8f8;
    font-weight: 600;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid;
}

.badge-admin {
    background: #e3f2fd;
    color: #1976d2;
    border-color: #90caf9;
}

.badge-success {
    background: #e8f5e9;
    color: #388e3c;
    border-color: #81c784;
}

.badge-warning {
    background: #fff3e0;
    color: #f57c00;
    border-color: #ffb74d;
}

.badge-danger {
    background: #ffebee;
    color: #d32f2f;
    border-color: #ef5350;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .container { padding: 10px; }
    .card { padding: 15px; margin-bottom: 15px; }
    h1 { font-size: 22px !important; margin-bottom: 20px !important; }
    h2 { font-size: 18px; }
    
    header { padding: 10px 0; margin-bottom: 15px; }
    header .container { flex-direction: column; gap: 10px; }
    nav a { margin: 0 10px; font-size: 14px; }

    .form-group { margin-bottom: 15px; }
    
    /* Mobile Grid System */
    .mobile-two-col {
        display: flex;
        gap: 15px;
        margin-bottom: 15px;
    }
    .mobile-two-col .form-group {
        flex: 1;
        margin-bottom: 0;
    }

    /* Compact Sources */
    #historyOptions, #playlistOptions, #styleOptions {
        margin-left: 0 !important;
        margin-top: 10px;
        padding-left: 10px;
        border-left: 2px solid #1DB954;
    }

    /* Table Optimizations */
    .hide-mobile { display: none; }
    table { font-size: 13px; }
    th, td { padding: 8px 4px; }
    
    /* Button adjustments */
    .btn { width: 100%; text-align: center; margin-bottom: 5px; }
    td .btn { width: auto; margin-bottom: 0; }
}