/* ============================================
   Multi-Project Test Suite - UI/UX Pro Max
   Dark Mode + Glassmorphism
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Colors - Dark Theme */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;

    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: rgba(0, 0, 0, 0.3);

    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;

    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);

    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================
   Glass Card Component
   ============================================ */

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: 0 8px 32px var(--glass-shadow);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px var(--glass-shadow);
}

/* ============================================
   Navigation
   ============================================ */

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-xl);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.lang-switcher {
    display: flex;
    gap: var(--space-sm);
    margin-left: var(--space-md);
    padding-left: var(--space-md);
    border-left: 1px solid var(--glass-border);
}

.lang-switcher a {
    text-decoration: none;
    font-size: 1.5rem;
    /* Larger */
    opacity: 0.5;
    /* Dimmed instead of grayscale */
    transition: all var(--transition-fast);
}

.lang-switcher a:hover {
    opacity: 1;
    /* Full brightness */
    transform: scale(1.2);
}

/* ============================================
   Main Layout
   ============================================ */

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: var(--space-xl);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* ============================================
   Typography
   ============================================ */

h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

/* ============================================
   Action Bar
   ============================================ */

.action-bar {
    margin: var(--space-lg) 0;
}

/* ============================================
   Buttons
   ============================================ */

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

/* Complex Vote Button */
.vote-btn-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.vote-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    /* Dark background */
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 1.2rem;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.vote-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

/* Tooltip / Expanded Part */
.vote-tooltip {
    position: absolute;
    right: 100%;
    /* Initially hidden inside or to the right? User image: Left expanded, Right without mouse. 
                   If "Right without mouse" means collapsed state is on the right of the text? 
                   Or the button is on the right? 
                   Assuming standard tooltip behavior: Tooltip appears on hover. 
                   "Links aufgeklappt" = Expanded to the left? or Tooltip is on the left?
                   Let's make it expand FROM the button. */
    top: 50%;
    transform: translateY(-50%) translateX(20px);
    background: var(--accent-gradient);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    /* Connect to button on right */
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    /* "Left expanded": implies the text is to the left of the button */
    margin-right: -5px;
    /* Overlap slightly */
}

/* On Wrapper Hover, show tooltip */
.vote-btn-wrapper:hover .vote-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(-40px);
    /* Move out to left */
}

/* Large Vote Button (Detail View) */
.vote-btn.large {
    width: auto;
    height: auto;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-lg);
    font-size: 1.5rem;
    gap: var(--space-md);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    box-shadow: inset 0 0 0 1px var(--glass-border);
}

.vote-btn.large:hover {
    background: var(--accent-gradient);
    border-color: transparent;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

/* Counter Badge */
.vote-count {
    font-weight: 700;
    margin-left: 5px;
}

/* ============================================
   Forms
   ============================================ */

input,
select,
textarea {
    width: 100%;
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 500;
    color: var(--text-secondary);
}

/* ============================================
   Auth Pages
   ============================================ */

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-card h1 {
    margin-bottom: var(--space-xl);
}

.auth-card form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.auth-card p {
    margin-top: var(--space-lg);
    color: var(--text-secondary);
}

.auth-card a {
    color: var(--accent-primary);
}

.error-message {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid var(--error);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    color: var(--error);
    margin-bottom: var(--space-md);
}

/* ============================================
   Dashboard & Cards
   ============================================ */

.section {
    margin-bottom: var(--space-2xl);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.project-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card h3 {
    color: var(--text-primary);
}

.project-card .stats {
    margin-top: auto;
    padding-top: var(--space-md);
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.project-card .stats {
    display: flex;
    gap: var(--space-md);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.stat-card {
    text-align: center;
    padding: var(--space-xl);
}

.stat-card h3 {
    font-size: 2.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--space-xs);
}

.stat-card p {
    color: var(--text-secondary);
}

/* ============================================
   Ticket List
   ============================================ */

.ticket-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.ticket-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
}

.ticket-item a {
    flex: 1;
    color: var(--text-primary);
    text-decoration: none;
}

.ticket-item a:hover {
    color: var(--accent-primary);
}

/* Type badges */
.ticket-type {
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.type-bug {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.type-feature {
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent-primary);
}

.type-idea {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

/* Status badges */
.ticket-status {
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

.status-open {
    color: var(--success);
}

.status-in_progress {
    color: var(--info);
}

.status-resolved {
    color: var(--text-muted);
}

.status-closed {
    color: var(--text-muted);
}

/* Priority badges */
.ticket-priority {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.priority-critical {
    color: var(--error);
    font-weight: 600;
}

.priority-high {
    color: var(--warning);
}

/* ============================================
   Ticket Detail
   ============================================ */

.back-link {
    display: inline-block;
    margin-bottom: var(--space-lg);
    color: var(--text-secondary);
    text-decoration: none;
}

.back-link:hover {
    color: var(--accent-primary);
}

.ticket-detail {
    max-width: 800px;
}

.ticket-header {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.ticket-meta {
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

.ticket-description {
    padding: var(--space-lg);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.ticket-images {
    margin-bottom: var(--space-lg);
}

.ticket-images img {
    max-width: 100%;
    border-radius: var(--radius-md);
    margin-top: var(--space-md);
}

.vote-section {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--glass-border);
}

/* ============================================
   Ideas Page
   ============================================ */

.idea-card {
    flex-direction: row;
    align-items: flex-start;
}

.idea-content {
    flex: 1;
}

.idea-content h3 {
    margin-bottom: var(--space-sm);
}

.idea-content p {
    color: var(--text-secondary);
}

.idea-content small {
    color: var(--text-muted);
}

/* ============================================
   Empty States
   ============================================ */

.empty-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-muted);
}

/* ============================================
   Error Pages
   ============================================ */

.error-page {
    text-align: center;
    padding: var(--space-2xl);
}

.error-page h1 {
    font-size: 6rem;
    margin-bottom: var(--space-md);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    .nav-bar {
        flex-direction: column;
        gap: var(--space-md);
    }

    .main-content {
        padding: var(--space-md);
    }

    h1 {
        font-size: 1.5rem;
    }

    .ticket-item {
        flex-wrap: wrap;
    }
}