/* General Consensus - Main Stylesheet */
/* Dark theme based on original design */

/* ============================================================================
   RESET & BASE STYLES
   ============================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Original Color Scheme - Dark Theme */
    --bg-gradient-start: #111;
    --bg-gradient-end: #222;
    --panel-bg: #1c1c1c;
    --panel-border: #444;

    --primary-color: #40a9ff;
    --primary-dark: #1c8ae0;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;

    /* Dark theme text colors */
    --text-primary: #f0f0f0;
    --text-secondary: #ddd;
    --text-muted: #888;
    --text-white: #fff;

    /* Form elements */
    --input-bg: #1a1a1a;
    --input-border: #555;
    --button-hover: #666;

    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

html, body {
    min-height: 100vh;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--text-primary);
    background: linear-gradient(to bottom, var(--bg-gradient-start), var(--bg-gradient-end));
    background-attachment: fixed;
    background-repeat: no-repeat;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-white);
    font-weight: 600;
    margin-top: 0;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    text-decoration: underline;
}

/* ============================================================================
   LAYOUT
   ============================================================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.site-content {
    min-height: calc(100vh - 200px);
    padding: var(--spacing-xl) 0;
}

/* ============================================================================
   HEADER
   ============================================================================ */

.site-header {
    background: transparent;
    padding: var(--spacing-lg) 0;
    text-align: center;
}

.main-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.logo a {
    display: inline-block;
}

.logo img {
    width: 390px;
    height: 34px;
    display: block;
}

/* Fallback text logo if image not loaded */
.logo a:not(:has(img)) {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-white);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.95rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: normal;
    padding: var(--spacing-xs) var(--spacing-sm);
    transition: color var(--transition-fast);
}

.nav-links a:hover {
    color: var(--text-white);
    text-decoration: none;
}

/* Dropdown Navigation */
.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    user-select: none;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0;
    padding-top: 0.75rem;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    list-style: none;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    display: block;
}

.dropdown-menu li:first-child {
    padding-top: 0;
}

.dropdown-menu li:last-child {
    padding-bottom: 0.5rem;
}

.dropdown-menu a {
    display: block;
    width: 100%;
    padding: 0.75rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
    white-space: nowrap;
    box-sizing: border-box;
}

.dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
}

/* Active state for mobile */
.nav-dropdown.active .dropdown-menu {
    display: block;
}

/* Comparison Badge */
.nav-links li {
    display: flex;
    align-items: center;
}

.compare-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.badge {
    display: inline-block;
    background: #dc3545;
    color: #fff;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full);
    min-width: 20px;
    text-align: center;
    line-height: 1;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.site-footer {
    background: transparent;
    color: var(--text-muted);
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-2xl);
    text-align: center;
    font-size: 0.85rem;
}

.footer-links {
    margin-top: var(--spacing-sm);
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--text-white);
}

/* ============================================================================
   PANELS (Reusable boxes)
   ============================================================================ */

.panel {
    background-color: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    max-width: 600px;
    margin: var(--spacing-2xl) auto;
}

/* ============================================================================
   FLASH MESSAGES
   ============================================================================ */

.flash-message {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.flash-success {
    background-color: #065f46;
    color: #d1fae5;
    border-left: 4px solid var(--secondary-color);
}

.flash-error {
    background-color: #991b1b;
    color: #fee2e2;
    border-left: 4px solid var(--danger-color);
}

.flash-warning {
    background-color: #92400e;
    color: #fef3c7;
    border-left: 4px solid var(--warning-color);
}

.flash-info {
    background-color: #155e75;
    color: #cffafe;
    border-left: 4px solid var(--info-color);
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    font-weight: normal;
    text-align: center;
    text-decoration: none;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    text-decoration: none;
}

.btn-secondary {
    background-color: #333;
    color: var(--text-primary);
    border-color: var(--button-hover);
}

.btn-secondary:hover {
    background-color: #444;
    color: var(--text-white);
    text-decoration: none;
}

/* ============================================================================
   FORMS
   ============================================================================ */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="file"],
select,
textarea {
    width: 100%;
    box-sizing: border-box;
    height: 42px;
    padding: 10px;
    margin-bottom: var(--spacing-md);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--input-bg);
    color: var(--text-primary);
    font-family: var(--font-family);
}

textarea {
    height: auto;
    min-height: 100px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

button[type="submit"] {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    cursor: pointer;
    transition: background-color var(--transition-base);
}

button[type="submit"]:hover {
    background-color: var(--primary-dark);
}

/* ============================================================================
   HOMEPAGE
   ============================================================================ */

.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    text-align: center;
}

.home-inner {
    background-color: var(--panel-bg);
    padding: var(--spacing-2xl);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
}

.home-inner h1 {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
    font-weight: 500;
    color: var(--text-white);
}

.home-inner p {
    font-size: 1rem;
    margin-bottom: var(--spacing-xl);
    color: var(--text-secondary);
}

.tagline {
    font-size: 1rem;
    margin-bottom: var(--spacing-xl);
    color: var(--text-secondary);
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.features-section {
    padding: var(--spacing-2xl) 0;
    max-width: 900px;
    margin: 0 auto;
}

.features-section h2 {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: var(--spacing-xl);
    color: var(--text-white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
}

.feature {
    padding: var(--spacing-lg);
    background-color: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    text-align: center;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.feature:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    font-size: 1.1rem;
}

.feature p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.user-stats-section {
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.user-stats-section h2 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
}

.user-stats-section p {
    margin-bottom: var(--spacing-lg);
    color: var(--text-secondary);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
    .logo img {
        width: 300px;
        height: 26px;
    }

    .nav-links {
        font-size: 0.9rem;
        gap: var(--spacing-md);
    }

    /* Mobile dropdown improvements */
    .dropdown-toggle {
        min-height: 44px; /* iOS minimum touch target */
        display: flex;
        align-items: center;
        padding: 8px 12px;
    }

    .dropdown-menu {
        left: auto;
        right: 0;
        transform: none;
        min-width: 160px;
    }

    .dropdown-menu a {
        min-height: 44px; /* iOS minimum touch target */
        display: flex;
        align-items: center;
    }

    .hero-section {
        min-height: 60vh;
        padding: var(--spacing-lg);
    }

    .home-inner {
        padding: var(--spacing-xl);
    }

    .home-inner h1 {
        font-size: 1.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo img {
        width: 250px;
        height: 22px;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons .btn {
        width: 100%;
    }

    .container {
        padding: 0 var(--spacing-md);
    }
}

/* ============================================================================
   VOTING INTERFACE
   ============================================================================ */

.vote-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
    width: 100%;
    min-height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
}

.vote-header {
    text-align: center;
    margin-top: 2rem;
    flex-shrink: 0;
}

.vote-header h1 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.vote-stats {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-icon {
    font-size: 1.25rem;
}

.stat-count {
    font-weight: bold;
    font-size: 1.1rem;
}

.stat-label {
    color: var(--text-secondary);
    margin-right: 0.25rem;
}

.stat-total {
    padding-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.vote-progress-bar {
    margin-top: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #52c41a);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.vote-main {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    max-height: calc(100vh - 280px);
}

.item-card.item-entering {
    animation: slideInUp 0.3s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.item-card.vote-animating {
    transition: all 0.5s ease;
}

.item-card.vote-like {
    transform: translateX(100%) rotate(15deg);
    opacity: 0;
}

.item-card.vote-dislike {
    transform: translateX(-100%) rotate(-15deg);
    opacity: 0;
}

.item-card.vote-unsure {
    transform: scale(0.8);
    opacity: 0;
}

/* Left section - Image and Content */
.item-card-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.item-image {
    width: 100%;
    height: 350px;
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
    flex-shrink: 0;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* Portrait images - align slightly below top to capture face area */
.item-image img.portrait {
    object-position: center 15%;
}

/* Landscape images - keep centered */
.item-image img.landscape {
    object-position: center center;
}

/* Square images - keep centered */
.item-image img.square {
    object-position: center center;
}

/* Right section - Voting controls */
.item-card-right {
    width: 350px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.item-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.item-placeholder::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.item-initial {
    font-size: 8rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.item-content {
    padding: 1.5rem 2rem;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.item-name {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.item-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
    max-height: 4.8em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.item-submitter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    width: fit-content;
}

.submitter-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.submitter-avatar-placeholder {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    color: var(--text-secondary);
}

.submitter-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.submitter-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.submitter-link:hover {
    text-decoration: underline;
}

.item-categories {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.category-tag {
    padding: 0.375rem 0.875rem;
    background: rgba(64, 169, 255, 0.2);
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--primary-color);
}

.category-tag.niche {
    background: rgba(245, 158, 11, 0.2);
    border-color: var(--warning-color);
    color: var(--warning-color);
}

.vote-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem 1.5rem;
    flex-shrink: 0;
}

.vote-btn {
    width: 100%;
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.vote-btn:hover:not(:disabled) {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.vote-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.vote-btn.vote-like {
    border-color: #52c41a;
}

.vote-btn.vote-like:hover:not(:disabled) {
    background: rgba(82, 196, 26, 0.2);
    border-color: #73d13d;
}

.vote-btn.vote-dislike {
    border-color: #f5222d;
}

.vote-btn.vote-dislike:hover:not(:disabled) {
    background: rgba(245, 34, 45, 0.2);
    border-color: #ff4d4f;
}

.vote-btn.vote-unsure {
    border-color: #faad14;
}

.vote-btn.vote-unsure:hover:not(:disabled) {
    background: rgba(250, 173, 20, 0.2);
    border-color: #ffc53d;
}

.vote-icon {
    font-size: 3rem;
}

.vote-label {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vote-loading {
    text-align: center;
    padding: 3rem 1rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.vote-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.vote-actions .btn {
    width: 100%;
    text-align: center;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Responsive voting interface */
@media (max-width: 1024px) {
    .vote-container {
        max-width: 700px;
    }

    .item-card {
        flex-direction: column;
        max-height: none;
    }

    .item-card-left {
        width: 100%;
    }

    .item-card-right {
        width: 100%;
    }

    .item-image {
        height: 300px;
    }

    .vote-buttons {
        flex-direction: row;
        padding: 1.5rem 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .vote-btn {
        flex: 1;
        flex-direction: column;
        gap: 0.5rem;
    }

    .vote-actions {
        flex-direction: row;
        justify-content: center;
        border-top: none;
        padding: 0 1.5rem 1.5rem;
    }

    .vote-actions .btn {
        width: auto;
    }
}

@media (max-width: 600px) {
    .vote-container {
        padding: 0.5rem;
        min-height: calc(100vh - 150px);
    }

    .vote-header {
        margin-top: 1.5rem;
    }

    .vote-header h1 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .vote-stats {
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .stat-item {
        font-size: 0.85rem;
    }

    .item-image {
        height: 250px;
    }

    .item-content {
        padding: 1.5rem;
    }

    .item-name {
        font-size: 1.4rem;
    }

    .vote-buttons {
        padding: 1.25rem 1rem;
        gap: 0.75rem;
    }

    .vote-btn {
        padding: 1rem 0.5rem;
    }

    .vote-actions {
        padding: 0 1rem 1.5rem;
        gap: 0.5rem;
    }
}

    .vote-icon {
        font-size: 2.5rem;
    }

    .vote-label {
        font-size: 0.85rem;
    }

    .vote-actions {
        flex-direction: column;
        margin-top: 1rem;
    }

    .vote-actions .btn {
        width: 100%;
    }
}

/* ============================================================================
   AD SECTIONS
   ============================================================================ */

.home-ad-section {
    padding: 2rem 0;
    background: rgba(255, 255, 255, 0.01);
}

.home-ad-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    min-height: 100px;
}

/* Responsive ad containers */
@media (max-width: 768px) {
    .home-ad-section {
        padding: 1rem 0;
    }
    
    .home-ad-section .container {
        padding: 1rem;
    }
}

/* ============================================================================
   FLOATING COMPARISON BASKET
   ============================================================================ */

.floating-basket {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    max-height: 500px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 2px solid #007bff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 123, 255, 0.3);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateY(600px);
    transition: transform 0.3s ease;
}

.floating-basket.visible {
    transform: translateY(0);
}

.floating-basket.hidden {
    display: none;
}

.basket-header {
    padding: 1rem;
    background: rgba(0, 123, 255, 0.1);
    border-bottom: 1px solid rgba(0, 123, 255, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.basket-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
}

.basket-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.basket-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.basket-items {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    max-height: 300px;
}

.basket-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #888;
    font-size: 0.9rem;
}

.basket-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: background 0.2s;
}

.basket-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.basket-item-image {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.basket-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.basket-item-initial {
    font-size: 1.5rem;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.5);
}

.basket-item-info {
    flex: 1;
    min-width: 0;
}

.basket-item-name {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.basket-item-remove {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid #dc3545;
    color: #dc3545;
    font-size: 1.2rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.basket-item-remove:hover {
    background: #dc3545;
    color: #fff;
}

.basket-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.basket-count {
    text-align: center;
    color: #adb5bd;
    font-size: 0.9rem;
}

.basket-count span {
    color: #007bff;
    font-weight: bold;
    font-size: 1.1rem;
}

.compare-now-btn {
    background: linear-gradient(135deg, #dc3545 0%, #ff4757 100%);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
    animation: pulse 2s infinite;
}

.compare-now-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.6);
}

.compare-now-btn.hidden {
    display: none;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(220, 53, 69, 0.7);
    }
}

.clear-basket-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #adb5bd;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-basket-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

@media (max-width: 768px) {
    .floating-basket {
        right: 10px;
        bottom: 10px;
        width: calc(100% - 20px);
        max-width: 350px;
    }
}

/* Minimized basket state */
.floating-basket.minimized .basket-body {
    display: none;
}

.floating-basket.minimized {
    max-height: 60px;
}

.floating-basket.minimized .basket-header {
    cursor: pointer;
}

.basket-title-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.basket-title-section h3 {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.basket-mini-count {
    color: #007bff;
    font-weight: bold;
    font-size: 0.95rem;
}

.basket-minimize {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 1.2rem;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.basket-minimize:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.basket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.basket-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}
