/* ===== CSS Variables ===== */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-card: #1a1a1a;
    --bg-hover: #252525;

    --accent-primary: #ff6b00;
    --accent-secondary: #ff8c33;
    --accent-gradient: linear-gradient(135deg, #ff6b00 0%, #ff9500 100%);
    --accent-glow: rgba(255, 107, 0, 0.3);

    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;

    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(255, 107, 0, 0.5);

    --success: #00cc66;
    --warning: #ff6b00;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 30px var(--accent-glow);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    background-image:
        radial-gradient(ellipse at 10% 20%, rgba(255, 107, 0, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 80%, rgba(255, 149, 0, 0.03) 0%, transparent 50%);
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Header ===== */
.header {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 30px;
}

.title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.title-icon {
    font-size: 1.2em;
    -webkit-text-fill-color: initial;
    animation: float 3s ease-in-out infinite;
}

.title-icon:last-child {
    animation-delay: 1.5s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== Notice Section ===== */
.notice-section {
    margin-bottom: 25px;
}

.notice-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
    background-image: linear-gradient(var(--bg-card), var(--bg-card)),
        linear-gradient(135deg, #f59e0b 0%, #ef4444 50%, #f59e0b 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.notice-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    animation: shake 2s ease-in-out infinite;
}

@keyframes shake {

    0%,
    100% {
        transform: rotate(0deg);
    }

    10%,
    30% {
        transform: rotate(-5deg);
    }

    20%,
    40% {
        transform: rotate(5deg);
    }

    50% {
        transform: rotate(0deg);
    }
}

.notice-content {
    flex: 1;
}

.notice-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--warning);
    margin-bottom: 12px;
}

.notice-list {
    list-style: none;
    margin-bottom: 18px;
}

.notice-list li {
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    border-bottom: 1px solid var(--border-color);
}

.notice-list li:last-child {
    border-bottom: none;
}

.notice-list li strong {
    color: var(--text-primary);
}

.notice-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.notice-link:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.4), var(--shadow-md);
}

.notice-link .arrow {
    transition: transform 0.3s ease;
}

.notice-link:hover .arrow {
    transform: translateX(5px);
}

/* ===== Search Section ===== */
.search-section {
    margin-bottom: 30px;
}

.search-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.search-group {
    margin-bottom: 25px;
}

.search-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.label-icon {
    font-size: 1.2em;
}

.search-input-wrapper {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.search-input,
.search-select {
    flex: 1;
    min-width: 200px;
    padding: 14px 18px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: var(--transition);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus,
.search-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.search-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6,9 12,15 18,9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 45px;
}

.search-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 10px;
}

/* ===== Buttons ===== */
.button-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon {
    font-size: 1.1em;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow), var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--accent-secondary);
}

/* ===== Results Section ===== */
.results-section {
    flex: 1;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.results-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 600;
}

.results-icon {
    font-size: 1.2em;
}

.results-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
}

.stat-value {
    font-weight: 700;
    color: var(--accent-secondary);
}

.stat-label {
    color: var(--text-secondary);
}

/* ===== Table ===== */
.table-container {
    flex: 1;
    overflow-x: auto;
    border-radius: var(--radius-md);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.results-table th,
.results-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.results-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.results-table tbody tr {
    transition: var(--transition);
}

.results-table tbody tr:hover {
    background: var(--bg-hover);
}

.results-table tbody tr:last-child td {
    border-bottom: none;
}

.results-table td {
    color: var(--text-secondary);
}

.results-table td:first-child {
    font-weight: 500;
    color: var(--text-primary);
}

.price {
    font-weight: 600;
    color: var(--success);
}

.shop-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-secondary);
    text-decoration: none;
    padding: 6px 12px;
    background: rgba(124, 58, 237, 0.1);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: var(--transition);
}

.shop-link:hover {
    background: rgba(124, 58, 237, 0.2);
    color: var(--accent-primary);
    transform: translateX(3px);
}

/* ===== Empty State ===== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.6;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.empty-text {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.hidden {
    display: none !important;
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 30px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header {
        padding: 25px 15px;
    }

    .search-card {
        padding: 20px;
    }

    .search-input-wrapper {
        flex-direction: column;
    }

    .search-input,
    .search-select {
        min-width: 100%;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .results-section {
        padding: 15px;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .results-table th,
    .results-table td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .shop-link {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.3rem;
    }

    .title-icon {
        font-size: 1em;
    }

    .results-table {
        font-size: 0.8rem;
    }
}