:root {
    /* Theme Colors */
    --theme-primary: #9900ff;
    --theme-secondary: #1e2328;
    --theme-background: #0d1117;
    --theme-surface: #161b22;
    --theme-text-primary: #f0f6fc;
    --theme-text-secondary: #8b949e;
    --theme-border: #30363d;
    --theme-success: #238636;
    --theme-warning: #d29922;
    --theme-danger: #da3633;
    --theme-category: #9900ff;
    --theme-type-news: #ffffff;
    --theme-type-obituary: #ffffff;
    --theme-success-text: #ffffff;
    --theme-warning-text: #ffffff;
    --theme-danger-text: #ffffff;
    --theme-icon-color: #ff0000;
    --theme-link-color: #9900ff;
    --theme-link-hover-color: #be5cff;
    --theme-button-radius: 10px;
    --theme-card-radius: 12px;
    
    /* RGB Values for alpha transparency */
    --theme-primary-rgb: 153, 0, 255;
    --theme-success-rgb: 35, 134, 54;
    --theme-warning-rgb: 210, 153, 34;
    --theme-danger-rgb: 218, 54, 51;
}

/* Theme Override Styles */
.dark-theme {
    --bg-primary: var(--theme-background);
    --bg-secondary: var(--theme-surface);
    --bg-tertiary: var(--theme-secondary);
    --text-primary: var(--theme-text-primary);
    --text-secondary: var(--theme-text-secondary);
    --border-color: var(--theme-border);
    --accent-color: var(--theme-primary);
    --border-radius: var(--theme-card-radius);
}

/* Button Styling */
.btn-primary, .btn.btn-primary {
    background: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    border-radius: var(--theme-button-radius) !important;
}

.btn-success {
    background: var(--theme-success) !important;
    border-color: var(--theme-success) !important;
    border-radius: var(--theme-button-radius) !important;
}

.btn-warning {
    background: var(--theme-warning) !important;
    border-color: var(--theme-warning) !important;
    border-radius: var(--theme-button-radius) !important;
}

.btn-danger {
    background: var(--theme-danger) !important;
    border-color: var(--theme-danger) !important;
    border-radius: var(--theme-button-radius) !important;
}

/* Card and Panel Styling */
.article-card, .card, .panel, .settings-section {
    border-radius: var(--theme-card-radius) !important;
    background: var(--theme-surface) !important;
    border-color: var(--theme-border) !important;
}

/* Alert Styling */
.alert, .alert-success, .alert-error, .alert-warning, .alert-info {
    border-radius: var(--theme-button-radius) !important;
    padding: 1rem 1.5rem !important;
    margin: 1rem 0 !important;
    border: 1px solid !important;
    font-weight: 500 !important;
}

.alert-success {
    background: rgba(35, 134, 54, 0.15) !important;
    border-color: var(--theme-success) !important;
    color: var(--theme-success-text) !important;
}

.alert-success i {
    color: var(--theme-success-text) !important;
}

.alert-warning {
    background: rgba(210, 153, 34, 0.15) !important;
    border-color: var(--theme-warning) !important;
    color: var(--theme-warning-text) !important;
}

.alert-warning i {
    color: var(--theme-warning-text) !important;
}

.alert-error, .alert-danger {
    background: rgba(218, 54, 51, 0.15) !important;
    border-color: var(--theme-danger) !important;
    color: var(--theme-danger-text) !important;
}

.alert-error i, .alert-danger i {
    color: var(--theme-danger-text) !important;
}

.alert-info {
    background: rgba(153, 0, 255, 0.15) !important;
    border-color: var(--theme-primary) !important;
    color: var(--theme-primary) !important;
}

.alert-info i {
    color: var(--theme-primary) !important;
}

/* Admin Alert Overrides */
.admin-content .alert-success {
    background: rgba(35, 134, 54, 0.15) !important;
    border-color: var(--theme-success) !important;
    color: var(--theme-success-text) !important;
}

.admin-content .alert-error, .admin-content .alert-danger {
    background: rgba(218, 54, 51, 0.15) !important;
    border-color: var(--theme-danger) !important;
    color: var(--theme-danger-text) !important;
}

.admin-content .alert-warning {
    background: rgba(210, 153, 34, 0.15) !important;
    border-color: var(--theme-warning) !important;
    color: var(--theme-warning-text) !important;
}

.admin-content .alert-info {
    background: rgba(153, 0, 255, 0.15) !important;
    border-color: var(--theme-primary) !important;
    color: var(--theme-primary) !important;
}

/* Navigation and Links */
.nav-link:hover, .nav-link.active {
    color: var(--theme-primary) !important;
}

a {
    color: var(--theme-primary);
}

/* Form Elements */
.form-control, input, textarea, select {
    border-radius: var(--theme-button-radius) !important;
    background: var(--theme-surface) !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-text-primary) !important;
}

.form-control:focus {
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 0 2px rgba(153, 0, 255, 0.25) !important;
}

/* Admin-specific styling */
.admin-layout {
    --bg-primary: var(--theme-background);
    --bg-secondary: var(--theme-surface);
    --bg-tertiary: var(--theme-secondary);
    --text-primary: var(--theme-text-primary);
    --text-secondary: var(--theme-text-secondary);
    --border-color: var(--theme-border);
    --admin-primary: var(--theme-primary);
    --admin-success: var(--theme-success);
    --admin-warning: var(--theme-warning);
    --admin-danger: var(--theme-danger);
}

.admin-header {
    background: var(--theme-surface) !important;
    border-bottom: 1px solid var(--theme-border) !important;
    color: var(--theme-text-primary) !important;
}

/* Button Hover Effects */
.btn:hover, button:hover {
    box-shadow: 0 0 24px rgba(153, 0, 255, 0.6) !important;
    transition: all 0.15s ease !important;
}

.action-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 0 29px rgba(153, 0, 255, 0.4) !important;
    transition: all 0.15s ease !important;
}

.btn-primary:hover {
    background: rgba(153, 0, 255, 0.9) !important;
    box-shadow: 0 4px 12px rgba(153, 0, 255, 0.4) !important;
}

.btn-success:hover, .action-btn.success:hover {
    background: rgba(35, 134, 54, 0.9) !important;
    color: var(--theme-success-text) !important;
    border-color: var(--theme-success) !important;
    box-shadow: 0 4px 12px rgba(35, 134, 54, 0.4) !important;
}

.btn-warning:hover, .action-btn.warning:hover {
    background: rgba(210, 153, 34, 0.9) !important;
    color: var(--theme-warning-text) !important;
    border-color: var(--theme-warning) !important;
    box-shadow: 0 4px 12px rgba(210, 153, 34, 0.4) !important;
}

.btn-danger:hover, .action-btn.danger:hover {
    background: rgba(218, 54, 51, 0.9) !important;
    color: var(--theme-danger-text) !important;
    border-color: var(--theme-danger) !important;
    box-shadow: 0 4px 12px rgba(218, 54, 51, 0.4) !important;
}

.action-btn.primary:hover {
    border-color: var(--theme-primary) !important;
    color: var(--theme-primary) !important;
    background: rgba(153, 0, 255, 0.1) !important;
}

.action-btn.secondary:hover {
    border-color: var(--theme-secondary) !important;
    color: var(--theme-text-primary) !important;
    background: rgba(30, 35, 40, 0.1) !important;
}

/* Card Hover Effects */
.card:hover, .dashboard-card:hover {
    box-shadow: 0 0 30px rgba(153, 0, 255, 0.3) !important;
    border-color: var(--theme-primary) !important;
    transition: all 0.3s ease !important;
}

/* Link Hover Effects */
a:hover {
    color: var(--theme-primary) !important;
    transition: all 0.3s ease !important;
}

/* Form Input Focus Effects */
input:focus, textarea:focus, select:focus {
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 0 3px rgba(153, 0, 255, 0.1) !important;
    outline: none !important;
}

/* Button Base Styles */
.btn {
    border-radius: var(--theme-button-radius) !important;
    transition: all 0.3s ease !important;
    border: 1px solid transparent !important;
}

.btn-primary {
    background: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    color: white !important;
}

.btn-success {
    background: var(--theme-success) !important;
    border-color: var(--theme-success) !important;
    color: var(--theme-success-text) !important;
}

.btn-warning {
    background: var(--theme-warning) !important;
    border-color: var(--theme-warning) !important;
    color: var(--theme-warning-text) !important;
}

.btn-danger {
    background: var(--theme-danger) !important;
    border-color: var(--theme-danger) !important;
    color: var(--theme-danger-text) !important;
}

.btn-secondary {
    background: var(--theme-secondary) !important;
    border-color: var(--theme-secondary) !important;
    color: var(--theme-text-primary) !important;
}

.btn-outline {
    background: transparent !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-text-primary) !important;
}

.btn-outline:hover {
    background: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    color: white !important;
}

/* Frontend specific styles */
.quick-link-card:hover {
    box-shadow: 0 0 25px rgba(153, 0, 255, 0.4) !important;
    transition: all 0.3s ease !important;
}

.admin-sidebar {
    background: var(--theme-secondary) !important;
    border-right: 1px solid var(--theme-border) !important;
}

.nav-link {
    color: var(--theme-text-secondary) !important;
    border-radius: var(--theme-button-radius) !important;
}

.nav-link:hover, .nav-link.active {
    background: var(--theme-primary) !important;
    color: white !important;
}

.nav-section-title {
    color: var(--theme-text-primary) !important;
}

.admin-main {
    background: var(--theme-background) !important;
}

.page-header h1 {
    color: var(--theme-text-primary) !important;
}

.stats-grid .stat-card {
    background: var(--theme-surface) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: var(--theme-card-radius) !important;
}

.stat-card h3 {
    color: var(--theme-text-primary) !important;
}

.stat-card .stat-number {
    color: var(--theme-primary) !important;
}

/* Icon Styling */
.fas, .far, .fab, i {
    color: var(--theme-icon-color) !important;
}

/* Logo icon should use primary color */
.logo i {
    color: var(--theme-primary) !important;
}

/* Link Styling */
.read-more, .news-card h3 a {
    color: var(--theme-link-color) !important;
    transition: color 0.3s ease;
}

.read-more:hover, .news-card h3 a:hover {
    color: var(--theme-link-hover-color) !important;
}

/* Site name/title */
.logo span, .site-title {
    color: var(--theme-text-primary) !important;
}

/* Remove gradients */
.btn, .btn-primary, .btn-secondary, .btn-success, .btn-warning, .btn-danger {
    background: var(--theme-primary) !important;
    background-image: none !important;
    color: white !important;
}

.btn:hover, .btn-primary:hover, .btn-secondary:hover, .btn-success:hover, .btn-warning:hover, .btn-danger:hover {
    color: white !important;
}

.btn-outline {
    background: transparent !important;
    color: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
}

.btn-outline:hover {
    background: var(--theme-primary) !important;
    color: white !important;
}

