/* Theme Variables - Global Colors */
:root {
    /* Dark Theme Colors */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --bg-hover: #30363d;
    
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-muted: #656d76;
    
    --border-primary: #30363d;
    --border-secondary: #21262d;
    --border-color: #30363d;
    --border-danger: #da3633;
    
    --accent-primary: #238636;
    --accent-secondary: #1f6feb;
    --accent-warning: #d29922;
    --accent-danger: #da3633;
    --accent-color: #58a6ff;
    
    --text-danger: #ff7b72;
    --text-warning: #e3b341;
    --bg-warning: #fff8dc;
    
    --github-blue: #0969da;
    --github-green: #1a7f37;
    --github-orange: #fb8500;
    --github-red: #cf222e;
    --github-purple: #8250df;
    
    /* Shadows */
    --shadow-small: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-large: 0 8px 24px rgba(0, 0, 0, 0.5);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Light Theme Override */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f6f8fa;
    --bg-tertiary: #ffffff;
    --bg-hover: #f3f4f6;
    
    --text-primary: #24292f;
    --text-secondary: #656d76;
    --text-muted: #8b949e;
    
    --border-primary: #d0d7de;
    --border-secondary: #d8dee4;
    --border-color: #d0d7de;
    --border-danger: #cf222e;
    
    --accent-primary: #1a7f37;
    --accent-secondary: #0969da;
    --accent-warning: #d29922;
    --accent-danger: #cf222e;
    --accent-color: #0969da;
    
    --text-danger: #cf222e;
    --text-warning: #d29922;
    --bg-warning: #fff8dc;
    
    --shadow-small: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-large: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Global Base Styles */
* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    transition: background-color var(--transition-medium), color var(--transition-medium);
}

/* Common Card Styles */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 16px;
    box-shadow: var(--shadow-small);
    transition: all var(--transition-fast);
}

.card:hover {
    box-shadow: var(--shadow-medium);
    border-color: var(--accent-secondary);
}

/* Common Button Styles */
.btn {
    background: var(--accent-secondary);
    color: var(--text-primary);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
}

.btn:hover {
    background: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-small);
}

.btn-primary {
    background: var(--github-blue);
}

.btn-primary:hover {
    background: #0860ca;
}

.btn-success {
    background: var(--github-green);
}

.btn-success:hover {
    background: #1a7f37;
}

.btn-warning {
    background: var(--github-orange);
}

.btn-warning:hover {
    background: #e07500;
}

.btn-danger {
    background: var(--github-red);
}

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

.btn-small {
    padding: 4px 8px;
    font-size: 12px;
}

/* Common Input Styles */
.form-control {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-secondary);
    box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    background: var(--bg-hover);
}

/* Common Link Styles */
a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

/* Common Text Styles */
.text-muted {
    color: var(--text-muted);
}

.text-secondary {
    color: var(--text-secondary);
}

/* GitHub-specific styles */
.github-repo-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 16px;
    margin: 8px 0;
    transition: all var(--transition-fast);
}

.github-repo-card:hover {
    border-color: var(--accent-secondary);
    box-shadow: var(--shadow-medium);
}

.github-label {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin: 2px;
}

.github-avatar {
    border-radius: 50%;
    border: 1px solid var(--border-primary);
}

/* Status indicators */
.status-open {
    color: var(--github-green);
}

.status-closed {
    color: var(--github-red);
}

.status-merged {
    color: var(--github-purple);
}

/* Priority indicators */
.priority-low {
    color: var(--github-green);
}

.priority-medium {
    color: var(--github-orange);
}

.priority-high {
    color: var(--github-red);
}

.priority-critical {
    color: var(--accent-danger);
    font-weight: bold;
}