/* DevBid Common Styles - Dark Theme */

/* ===== CSS Variables ===== */
:root {
    --background: 222 47% 6%;
    --foreground: 210 40% 98%;
    --card: 222 47% 8%;
    --card-foreground: 210 40% 98%;
    --primary: 172 66% 50%;
    --primary-foreground: 222 47% 6%;
    --secondary: 217 33% 12%;
    --secondary-foreground: 210 40% 98%;
    --muted: 217 33% 15%;
    --muted-foreground: 215 20% 55%;
    --accent: 160 84% 39%;
    --accent-foreground: 210 40% 98%;
    --destructive: 0 84% 60%;
    --destructive-foreground: 210 40% 98%;
    --border: 217 33% 18%;
    --ring: 172 66% 50%;
    --success: 160 84% 39%;

    --gradient-primary: linear-gradient(135deg, hsl(172 66% 50%), hsl(160 84% 39%));
    --gradient-hero: linear-gradient(135deg, hsl(222 47% 8%) 0%, hsl(217 33% 12%) 50%, hsl(222 47% 10%) 100%);
    --gradient-glow: radial-gradient(ellipse at center, hsl(172 66% 50% / 0.15), transparent 70%);

    --shadow-glow: 0 0 40px hsl(172 66% 50% / 0.3);
    --shadow-card: 0 4px 24px hsl(222 47% 2% / 0.4);

    --radius: 0.75rem;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== Utility Classes ===== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.glass {
    background: hsl(var(--card) / 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid hsl(var(--border) / 0.5);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glow {
    box-shadow: var(--shadow-glow);
}

/* ===== Animations ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes gradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.animate-float {
    animation: float 8s ease-in-out infinite;
}

.animate-fade-up {
    animation: fadeUp 0.6s ease-out forwards;
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient 8s ease infinite;
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

/* Animation delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }

/* ===== Background Effects ===== */
.bg-effects {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
}

.bg-blob-1 {
    top: 0;
    left: 25%;
    width: 24rem;
    height: 24rem;
    background: hsl(var(--primary) / 0.05);
}

.bg-blob-2 {
    bottom: 25%;
    right: 25%;
    width: 20rem;
    height: 20rem;
    background: hsl(var(--primary) / 0.1);
    animation-delay: -3s;
}

/* ===== Layout ===== */
.main-content {
    position: relative;
    z-index: 1;
    padding: 2rem 0;
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 2.5rem;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiNmZmZmZmYiIGZpbGwtb3BhY2l0eT0iMC4wMyI+PGNpcmNsZSBjeD0iMzAiIGN5PSIzMCIgcj0iMiIvPjwvZz48L2c+PC9zdmc+");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    padding: 4rem 2rem;
    text-align: center;
}

.welcome-box {
    display: inline-block;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 0.75rem;
}

.welcome-box h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.welcome-box p {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: hsl(var(--foreground) / 0.8);
    margin-bottom: 2rem;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
    background: hsl(var(--primary) / 0.9);
    transform: scale(1.05);
}

.btn-secondary {
    background: hsl(var(--secondary) / 0.5);
    color: hsl(var(--foreground));
    border: 1px solid hsl(var(--border));
}

.btn-secondary:hover {
    background: hsl(var(--secondary) / 0.8);
}

.btn-sm {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}

@media (min-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    padding: 1.5rem;
    border-radius: 0.75rem;
    opacity: 0;
}

.stat-card-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    background: hsl(var(--primary) / 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    width: 1.5rem;
    height: 1.5rem;
    color: hsl(var(--primary));
}

.stat-label {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: hsl(var(--foreground));
}

/* ===== Tabs ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.tabs {
    display: flex;
    gap: 0.5rem;
}

.tab-btn {
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: hsl(var(--secondary));
    color: hsl(var(--muted-foreground));
}

.tab-btn:hover {
    color: hsl(var(--foreground));
}

.tab-btn.active {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.view-all {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: hsl(var(--primary));
    text-decoration: none;
    font-weight: 500;
}

.view-all:hover {
    text-decoration: underline;
}

/* ===== Auction Cards Grid ===== */
.auction-grid {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
    .auction-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .auction-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== Auction Card ===== */
.auction-card {
    border-radius: 0.75rem;
    overflow: hidden;
}

.auction-image {
    height: 12rem;
    background: hsl(var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auction-image i {
    width: 4rem;
    height: 4rem;
    color: hsl(var(--muted-foreground) / 0.5);
}

.auction-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, hsl(var(--primary) / 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auction-card:hover .auction-image::before {
    opacity: 1;
}

.hot-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: hsl(var(--destructive) / 0.9);
    color: hsl(var(--destructive-foreground));
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.hot-badge i {
    width: 0.75rem;
    height: 0.75rem;
    color: inherit;
}

.new-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid hsl(var(--primary) / 0.2);
}

.auction-content {
    padding: 1.25rem;
}

.auction-title {
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.auction-card:hover .auction-title {
    color: hsl(var(--primary));
}

.auction-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.price-label {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}

.price-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: hsl(var(--primary));
}

.price-unit {
    font-size: 0.875rem;
    font-weight: 400;
    color: hsl(var(--muted-foreground));
}

.time-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.time-badge.urgent {
    background: hsl(var(--destructive) / 0.1);
    color: hsl(var(--destructive));
    border: 1px solid hsl(var(--destructive) / 0.2);
}

.time-badge.normal {
    background: hsl(var(--success) / 0.1);
    color: hsl(var(--success));
    border: 1px solid hsl(var(--success) / 0.2);
}

.auction-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.auction-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.auction-meta i {
    width: 1rem;
    height: 1rem;
}

.auction-buttons {
    display: flex;
    gap: 0.5rem;
}

.auction-buttons .btn {
    flex: 1;
}

.auction-buttons .btn-secondary {
    flex: none;
}

/* ===== Tab Content ===== */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ===== Features Section ===== */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    margin-bottom: 1.5rem;
}

.features-grid {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.feature-card {
    padding: 1.5rem;
    border-radius: 0.75rem;
}

.feature-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    background: hsl(var(--primary) / 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: background 0.3s ease;
}

.feature-card:hover .feature-icon {
    background: hsl(var(--primary) / 0.2);
}

.feature-icon i {
    width: 1.75rem;
    height: 1.75rem;
    color: hsl(var(--primary));
}

.feature-title {
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 0.5rem;
}

.feature-desc {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.6;
}

/* ===== Quick Actions ===== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.action-icon {
    width: 3.5rem;
    height: 3.5rem;
    min-width: 3.5rem;
    border-radius: 0.75rem;
    background: hsl(var(--primary) / 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.action-icon i {
    width: 2rem;
    height: 2rem;
    color: hsl(var(--primary));
    transition: all 0.3s ease;
}

.action-card:hover .action-icon {
    background: hsl(var(--primary));
    transform: scale(1.1);
}

.action-card:hover .action-icon i {
    color: hsl(var(--primary-foreground));
}

.action-content {
    flex: 1;
}

.action-title {
    font-size: 1rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 0.25rem;
    transition: color 0.3s ease;
}

.action-card:hover .action-title {
    color: hsl(var(--primary));
}

.action-desc {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.5;
}

/* ===== Quick Links ===== */
.quick-links {
    padding: 1rem;
    border-radius: 0.75rem;
}

.quick-links-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    font-size: 0.875rem;
}

.quick-links a {
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    transition: color 0.3s ease;
}

.quick-links a:hover {
    color: hsl(var(--primary));
}

.quick-links a.logout {
    color: hsl(var(--destructive));
}

.quick-links a.logout:hover {
    color: hsl(var(--destructive) / 0.8);
}

.quick-links .separator {
    color: hsl(var(--border));
}

/* ===== Forms (for login, register pages) ===== */
.form-container {
    max-width: 450px;
    margin: 0 auto;
}

.form-card {
    background: hsl(var(--card) / 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: calc(var(--radius) + 4px);
    box-shadow: var(--shadow-card);
    border: 1px solid hsl(var(--border) / 0.5);
}

.form-header {
    text-align: center;
    margin-bottom: 32px;
}

.form-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    margin-bottom: 8px;
}

.form-header p {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: hsl(var(--foreground));
    font-size: 0.875rem;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: hsl(var(--card));
    color: hsl(var(--foreground));
}

.form-group input:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

.form-button {
    width: 100%;
    padding: 14px 24px;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border: none;
    border-radius: calc(var(--radius) - 2px);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-card);
}

.form-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.form-footer {
    margin-top: 24px;
    text-align: center;
}

.form-footer a {
    color: hsl(var(--primary));
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.form-footer a:hover {
    color: hsl(var(--primary) / 0.8);
}

.error-message {
    background: hsl(var(--destructive) / 0.1);
    color: hsl(var(--destructive));
    padding: 12px 16px;
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid hsl(var(--destructive) / 0.2);
    margin-bottom: 20px;
    font-size: 0.875rem;
}

.success-message {
    background: hsl(var(--success) / 0.1);
    color: hsl(var(--success));
    padding: 12px 16px;
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid hsl(var(--success) / 0.2);
    margin-bottom: 20px;
    font-size: 0.875rem;
}

/* ===== Status Badges ===== */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid;
}

.status-badge.ongoing {
    background: hsl(var(--success) / 0.1);
    color: hsl(var(--success));
    border-color: hsl(var(--success) / 0.2);
}

.status-badge.completed {
    background: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
    border-color: hsl(var(--primary) / 0.2);
}

.status-badge.failed {
    background: hsl(var(--destructive) / 0.1);
    color: hsl(var(--destructive));
    border-color: hsl(var(--destructive) / 0.2);
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: hsl(var(--muted-foreground));
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* ===== Responsive ===== */
@media (min-width: 768px) {
    .hero-title {
        font-size: 4.5rem;
    }

    .hero-content {
        padding: 5rem 2rem;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .auction-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

.carousel {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
    margin: 1rem 0;
}

.carousel-track {
    display: flex;
    gap: 1rem;
    width: max-content;
    animation: scroll-left 30s linear infinite;
}

.carousel-item {
    width: 160px;
    min-width: 160px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 0.7rem;
    backdrop-filter: blur(8px);
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.carousel-item .thumb {
    width: 100%;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
}

.carousel-item .title {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.carousel-item .price {
    font-size: 0.85rem;
    color: #ff5722;
    margin-top: 0.3rem;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.carousel:hover .carousel-track {
    animation-play-state: paused; /* 전체 회전 멈춤 */
}

.carousel-item {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.carousel-item:hover {
    transform: scale(1.1); /* 살짝 커짐 */
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    z-index: 10; /* 위로 올라와 보이도록 */
}

