:root {
    --primary: #6B46C1;
    --secondary: #EC4899;
    --dark: #0a0a0a;
    --darker: #050505;
    --light: #ffffff;
    --gray: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --danger: #ef4444;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--dark);
    color: var(--light);
    min-height: 100vh;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--dark), var(--darker));
}

.login-box {
    background: var(--gray);
    padding: 40px;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo h1 {
    font-size: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Admin Layout */
.admin-wrapper {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: var(--darker);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    justify-content: center;
}

.logo h2 {
    font-size: 28px;
    margin: 0;
}

.nav-menu {
    list-style: none;
    flex: 1;
}

.nav-menu li {
    margin-bottom: 5px;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--light);
    text-decoration: none;
    border-radius: 8px;
    opacity: 0.7;
    transition: all 0.3s;
}

.nav-menu a:hover {
    background: var(--gray);
    opacity: 1;
}

.nav-menu a.active {
    background: var(--gray);
    opacity: 1;
    border-left: 3px solid var(--primary);
}

.sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.user-info {
    margin-bottom: 15px;
}

.user-info small {
    opacity: 0.6;
}

.logout-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

.content {
    padding: 30px;
    overflow-y: auto;
    max-width: 1400px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.page-header h1 {
    font-size: 32px;
    margin: 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--light);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--light);
    font-size: 16px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

/* Select dropdowns */
select {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--light);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

select option {
    background: #1a1a1a;
    color: #ffffff;
    padding: 10px;
}

/* Platform-specific select styling */
.platform-select {
    width: 100%;
    padding: 8px 12px;
    padding-left: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--light);
    font-size: 14px;
    cursor: pointer;
}

.platform-select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

/* Color inputs */
.form-group input[type="color"] {
    width: 60px;
    height: 40px;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-danger {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--light);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(107, 70, 193, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--light);
    border: 1px solid var(--border);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-block {
    width: 100%;
    display: block;
}

/* Artist Grid */
.artist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.artist-card-admin {
    background: var(--gray);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.artist-card-admin:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.artist-card-admin img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.artist-card-info {
    padding: 20px;
}

.artist-card-info h3 {
    margin-bottom: 8px;
    font-size: 20px;
}

.artist-card-info p {
    opacity: 0.7;
    font-size: 14px;
    margin-bottom: 5px;
}

.artist-card-info small {
    opacity: 0.5;
    font-size: 12px;
}

.artist-card-actions {
    padding: 0 20px 20px;
    display: flex;
    gap: 8px;
}

.btn-edit, .btn-view, .btn-delete {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-edit {
    background: rgba(107, 70, 193, 0.2);
    color: var(--light);
}

.btn-view {
    background: rgba(236, 72, 153, 0.2);
    color: var(--light);
}

.btn-delete {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

/* Platform Management */
.platforms-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.platform-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: all 0.3s;
}

.platform-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(107, 70, 193, 0.3);
}

.platform-row.dragging {
    opacity: 0.5;
    background: rgba(107, 70, 193, 0.1);
}

.platform-drag {
    cursor: move;
    color: rgba(255, 255, 255, 0.3);
    padding: 0 8px;
}

.drag-handle {
    font-size: 20px;
    line-height: 1;
    user-select: none;
}

.platform-content {
    flex: 1;
    display: flex;
    gap: 12px;
    align-items: center;
}

.platform-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 180px;
}

.platform-icon {
    position: absolute;
    left: 10px;
    width: 20px;
    height: 20px;
    object-fit: contain;
    pointer-events: none;
}

.platform-url {
    flex: 1;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--light);
    font-size: 14px;
}

.platform-featured {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.platform-featured-check {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.platform-featured label {
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.btn-remove-platform {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove-platform:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.1);
}

.btn-add-platform {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(107, 70, 193, 0.1);
    border: 2px dashed rgba(107, 70, 193, 0.3);
    border-radius: 10px;
    color: var(--light);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-add-platform:hover {
    background: rgba(107, 70, 193, 0.2);
    border-color: rgba(107, 70, 193, 0.5);
}

.btn-add-platform span {
    font-size: 18px;
    font-weight: bold;
}

/* Color Input Improvements */
.color-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.color-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.color-input-wrapper input[type="color"] {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.color-value {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--gray);
    padding: 25px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.stat-card h3 {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.stat-card .value {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-link {
    font-size: 14px;
    color: var(--primary);
    text-decoration: none;
    margin-top: 10px;
    display: inline-block;
}

/* Dashboard Sections */
.dashboard-section {
    margin-bottom: 40px;
}

.dashboard-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

/* Artist Overview List */
.artist-overview-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.artist-overview-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--gray);
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.artist-overview-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.artist-overview-item img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.artist-overview-details {
    flex: 1;
}

.artist-overview-details h4 {
    margin-bottom: 5px;
    font-size: 18px;
}

.artist-overview-details p {
    opacity: 0.7;
    font-size: 14px;
    margin-bottom: 5px;
}

.artist-overview-details small {
    opacity: 0.5;
    font-size: 12px;
}

.artist-overview-actions {
    display: flex;
    gap: 10px;
}

/* Email List */
.email-list {
    background: var(--gray);
    padding: 20px;
    border-radius: 10px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border);
}

.email-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid var(--border);
}

.email-item:last-child {
    border-bottom: none;
}

.email-item small {
    opacity: 0.6;
}

/* Settings Section */
.settings-section {
    background: var(--gray);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.settings-section h2 {
    margin-bottom: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-item label {
    font-size: 12px;
    opacity: 0.6;
    text-transform: uppercase;
}

.info-item span {
    font-size: 16px;
    font-weight: 500;
}

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

.alert.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.alert.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--darker);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--border);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--light);
    font-size: 24px;
    cursor: pointer;
    opacity: 0.5;
}

.modal-close:hover {
    opacity: 1;
}

/* Form Sections */
.form-section {
    background: var(--gray);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.form-section h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.edit-form {
    max-width: 1000px;
}

/* Media Info */
.media-info {
    background: var(--gray);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.media-info ul {
    margin-top: 20px;
    list-style: none;
}

.media-info li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.media-info li:last-child {
    border-bottom: none;
}

.media-info code {
    background: rgba(107, 70, 193, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: none;
    }
    
    .artist-grid {
        grid-template-columns: 1fr;
    }
    
    .platform-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .platform-select-wrapper {
        width: 100%;
    }
    
    .color-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}