/* ============================================
   GYEREUK - Industrial Noir + Korean Retro
   Version 2.1.0 - Full Featured
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

::selection {
    background: #FF4444;
    color: #121212;
}

/* ============================================
   CSS ICONS
   ============================================ */

.icon-plus {
    display: inline-block;
    width: 16px;
    height: 16px;
    position: relative;
}
.icon-plus::before,
.icon-plus::after {
    content: '';
    position: absolute;
    background: currentColor;
}
.icon-plus::before {
    width: 2px;
    height: 100%;
    left: 50%;
    transform: translateX(-50%);
}
.icon-plus::after {
    width: 100%;
    height: 2px;
    top: 50%;
    transform: translateY(-50%);
}

.icon-x {
    display: inline-block;
    width: 14px;
    height: 14px;
    position: relative;
}
.icon-x::before,
.icon-x::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: currentColor;
    top: 50%;
    left: 0;
}
.icon-x::before { transform: rotate(45deg); }
.icon-x::after { transform: rotate(-45deg); }

.icon-search,
.search-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-radius: 50%;
    position: relative;
}
.icon-search::after,
.search-icon::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 2px;
    background: currentColor;
    bottom: -2px;
    right: -4px;
    transform: rotate(45deg);
}

.icon-arrow-up {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-left: 2px solid currentColor;
    border-top: 2px solid currentColor;
    transform: rotate(45deg);
}

.icon-refresh {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-right-color: transparent;
}

/* Heart Icon */
.heart-icon {
    display: inline-block;
    width: 16px;
    height: 14px;
    position: relative;
}
.heart-icon::before,
.heart-icon::after {
    content: '';
    position: absolute;
    top: 0;
    width: 8px;
    height: 12px;
    border-radius: 8px 8px 0 0;
    background: currentColor;
}
.heart-icon::before {
    left: 8px;
    transform: rotate(-45deg);
    transform-origin: 0 100%;
}
.heart-icon::after {
    left: 0;
    transform: rotate(45deg);
    transform-origin: 100% 100%;
}

/* Share Icon */
.share-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    position: relative;
}
.share-icon::before {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    border: 2px solid currentColor;
    border-radius: 50%;
    top: 0;
    right: 0;
}
.share-icon::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 2px;
    background: currentColor;
    top: 7px;
    left: 0;
    transform: rotate(-30deg);
    box-shadow: 0 6px 0 currentColor;
}

/* Empty & Error Icons */
.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    position: relative;
    opacity: 0.4;
}
.empty-icon::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 16px;
    background: #E3DAC9;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 8px;
}
.empty-icon::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border: 4px solid #E3DAC9;
    border-radius: 50%;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    box-shadow: 36px 0 0 0 #E3DAC9;
}

.error-icon {
    width: 80px;
    height: 70px;
    margin: 0 auto;
    position: relative;
}
.error-icon::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 70px solid #FF4444;
    opacity: 0.3;
}
.error-icon::after {
    content: '!';
    position: absolute;
    font-family: 'Courier Prime', monospace;
    font-size: 32px;
    font-weight: bold;
    color: #FF4444;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
}

.placeholder-icon {
    width: 48px;
    height: 56px;
    border: 2px solid #333;
    position: relative;
    background: transparent;
}
.placeholder-icon::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: #0a0a0a;
    border-left: 2px solid #333;
    border-bottom: 2px solid #333;
}
.placeholder-icon::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 8px;
    right: 8px;
    height: 2px;
    background: #333;
    box-shadow: 0 8px 0 #333, 0 16px 0 #333;
}

/* ============================================
   OVERLAYS
   ============================================ */

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.scan-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 998;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.02),
        rgba(0, 0, 0, 0.02) 1px,
        transparent 1px,
        transparent 2px
    );
}

/* ============================================
   GLITCH EFFECT
   ============================================ */

.glitch {
    position: relative;
    animation: glitch-skew 4s infinite linear alternate-reverse;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #FF4444;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #00FFFF;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(31px, 9999px, 94px, 0); }
    20% { clip: rect(62px, 9999px, 42px, 0); }
    40% { clip: rect(16px, 9999px, 78px, 0); }
    60% { clip: rect(89px, 9999px, 13px, 0); }
    80% { clip: rect(45px, 9999px, 67px, 0); }
    100% { clip: rect(23px, 9999px, 85px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 32px, 0); }
    20% { clip: rect(12px, 9999px, 87px, 0); }
    40% { clip: rect(78px, 9999px, 45px, 0); }
    60% { clip: rect(34px, 9999px, 91px, 0); }
    80% { clip: rect(56px, 9999px, 23px, 0); }
    100% { clip: rect(89px, 9999px, 67px, 0); }
}

@keyframes glitch-skew {
    0%, 20%, 22%, 80%, 82%, 100% { transform: skew(0deg); }
    21% { transform: skew(1deg); }
    81% { transform: skew(-1deg); }
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
    background: linear-gradient(180deg, #1a1a1a 0%, #121212 100%);
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(255, 68, 68, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(0, 217, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid #252525;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: #FF4444;
    background: rgba(255, 68, 68, 0.05);
}

.stat-number {
    font-family: 'Courier Prime', monospace;
    font-size: 2rem;
    font-weight: bold;
    color: #E3DAC9;
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
}

/* ============================================
   SEARCH, FILTER & SORT
   ============================================ */

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-wrapper .search-icon {
    position: absolute;
    left: 12px;
    color: #666;
    width: 14px;
    height: 14px;
}

.search-input {
    width: 100%;
    padding: 0.625rem 2.5rem 0.625rem 2.5rem;
    background: #121212;
    border: 1px solid #333;
    color: #E3DAC9;
    font-family: 'Pretendard', sans-serif;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #FF4444;
    background: #0a0a0a;
}

.search-input::placeholder {
    color: #555;
}

.search-clear {
    position: absolute;
    right: 8px;
    padding: 4px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    transition: color 0.2s;
}

.search-clear:hover {
    color: #FF4444;
}

.sort-select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    background: #121212;
    border: 1px solid #333;
    color: #C4B8A5;
    font-family: 'Courier Prime', monospace;
    font-size: 0.75rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.sort-select:focus {
    outline: none;
    border-color: #FF4444;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid #333;
    color: #C4B8A5;
    font-family: 'Courier Prime', monospace;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.filter-btn:hover {
    border-color: #FF4444;
    color: #E3DAC9;
}

.filter-btn.active {
    background: #FF4444;
    border-color: #FF4444;
    color: #121212;
    font-weight: bold;
}

.filter-icon {
    margin-right: 0.25rem;
    font-size: 0.75rem;
}

/* Favorites Toggle */
.favorites-toggle {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid #333;
    color: #C4B8A5;
    font-family: 'Courier Prime', monospace;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.favorites-toggle:hover {
    border-color: #FF6B9D;
    color: #FF6B9D;
}

.favorites-toggle.active {
    background: #FF6B9D;
    border-color: #FF6B9D;
    color: #121212;
}

.favorites-toggle .heart-icon {
    width: 12px;
    height: 10px;
}

/* Status Dot */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #FF4444;
    border-radius: 50%;
    margin-right: 4px;
    animation: pulse 2s infinite;
}

.status-dot.error {
    animation: none;
    background: #FF4444;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================
   SKELETON LOADING
   ============================================ */

.skeleton-card {
    background: #1a1a1a;
    border: 1px solid #252525;
    min-height: 380px;
    position: relative;
    overflow: hidden;
}

.skeleton-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 150%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.02), transparent);
    animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
    to { left: 150%; }
}

/* ============================================
   RIB CARD
   ============================================ */

.rib-card {
    background: #1a1a1a;
    border: 1px solid #252525;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.rib-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #FF4444, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rib-card:hover {
    border-color: #FF4444;
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(255, 68, 68, 0.1), 0 0 0 1px rgba(255, 68, 68, 0.2);
}

.rib-card:hover::before {
    opacity: 1;
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px dashed #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-category {
    font-family: 'Courier Prime', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid #FF4444;
    color: #FF4444;
}

.card-index {
    font-family: 'Courier Prime', monospace;
    font-size: 0.7rem;
    color: #555;
}

/* Favorite Button */
.favorite-btn {
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    padding: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.favorite-btn:hover {
    color: #FF6B9D;
}

.favorite-btn.active {
    color: #FF6B9D;
}

.favorite-btn .heart-icon {
    width: 14px;
    height: 12px;
}

/* Share Button */
.share-btn {
    background: none;
    border: 1px solid #333;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-btn:hover {
    border-color: #E3DAC9;
    color: #E3DAC9;
}

/* Thumbnail */
.card-thumbnail {
    width: 100%;
    height: 140px;
    background: #0a0a0a;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(60%) contrast(1.1);
    transition: filter 0.3s ease;
}

.rib-card:hover .card-thumbnail img {
    filter: grayscale(0%) contrast(1);
}

.card-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: repeating-linear-gradient(45deg, #0a0a0a, #0a0a0a 10px, #0f0f0f 10px, #0f0f0f 20px);
}

.failed-stamp {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    font-family: 'Courier Prime', monospace;
    font-size: 1.25rem;
    font-weight: bold;
    color: #FF4444;
    border: 3px solid #FF4444;
    padding: 0.25rem 1rem;
    opacity: 0.7;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
    pointer-events: none;
    letter-spacing: 0.2em;
}

.card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: #E3DAC9;
}

.card-story {
    font-size: 0.875rem;
    color: #C4B8A5;
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
}

.card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #252525;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
}

.card-footer-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.card-price {
    font-family: 'Courier Prime', monospace;
    font-size: 1.25rem;
    font-weight: bold;
    color: #E3DAC9;
}

.card-price-label {
    font-size: 0.65rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.125rem;
}

.dig-button {
    padding: 0.625rem 1.25rem;
    background: transparent;
    border: 1px solid #E3DAC9;
    color: #E3DAC9;
    font-family: 'Pretendard', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.dig-button:hover {
    background: #FF4444;
    border-color: #FF4444;
    color: #121212;
}

/* Category Colors */
.category-개발 { border-color: #00D9FF; color: #00D9FF; background: rgba(0, 217, 255, 0.1); }
.category-디자인 { border-color: #FF6B9D; color: #FF6B9D; background: rgba(255, 107, 157, 0.1); }
.category-연구 { border-color: #A855F7; color: #A855F7; background: rgba(168, 85, 247, 0.1); }
.category-글 { border-color: #34D399; color: #34D399; background: rgba(52, 211, 153, 0.1); }

/* ============================================
   MODALS
   ============================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.hidden {
    display: none;
}

.modal-backdrop,
.about-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(4px);
}

.modal-container,
.about-container {
    position: relative;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content,
.about-content {
    background: #1a1a1a;
    border: 1px solid #333;
    position: relative;
}

.modal-close,
.about-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #252525;
    border: 1px solid #333;
    color: #E3DAC9;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

.modal-close:hover,
.about-close:hover {
    background: #FF4444;
    border-color: #FF4444;
    color: #121212;
}

.modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px dashed #333;
}

.modal-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-fav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #333;
    background: transparent;
}

.modal-fav:hover {
    border-color: #FF6B9D;
}

.modal-fav.active {
    background: rgba(255, 107, 157, 0.1);
    border-color: #FF6B9D;
}

.fav-text {
    font-size: 0.75rem;
    color: #C4B8A5;
}

.modal-category {
    font-family: 'Courier Prime', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.75rem;
    display: inline-block;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #E3DAC9;
    line-height: 1.4;
}

.modal-date {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.5rem;
    font-family: 'Courier Prime', monospace;
}

.modal-body-content {
    padding: 1.5rem 2rem;
}

.modal-thumbnail {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border: 1px solid #252525;
}

.modal-story {
    color: #C4B8A5;
    line-height: 1.8;
    white-space: pre-wrap;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #252525;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    gap: 1rem;
    flex-wrap: wrap;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.modal-price {
    font-family: 'Courier Prime', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: #E3DAC9;
}

.modal-price-label {
    font-size: 0.7rem;
    color: #555;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.25rem;
}

.share-btn-large {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: 1px solid #333;
    color: #C4B8A5;
    font-family: 'Pretendard', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.share-btn-large:hover {
    border-color: #E3DAC9;
    color: #E3DAC9;
}

.modal-cta {
    padding: 1rem 2rem;
    background: #FF4444;
    border: none;
    color: #121212;
    font-family: 'Pretendard', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.modal-cta:hover {
    background: #CC3636;
}

/* About Modal */
.about-content {
    max-width: 700px;
}

.about-header {
    padding: 2rem;
    border-bottom: 1px dashed #333;
}

.about-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #E3DAC9;
    margin-bottom: 0.5rem;
}

.about-subtitle {
    color: #666;
    font-family: 'Courier Prime', monospace;
    font-size: 0.875rem;
}

.about-body {
    padding: 2rem;
}

.about-section {
    margin-bottom: 2rem;
}

.about-section:last-child {
    margin-bottom: 0;
}

.about-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #FF4444;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.about-section p,
.about-section li {
    color: #C4B8A5;
    line-height: 1.7;
    font-size: 0.9rem;
}

.about-section ul {
    list-style: none;
    padding: 0;
}

.about-section li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.about-section li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #FF4444;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

#toast-container {
    position: fixed;
    bottom: 6rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.toast {
    padding: 0.75rem 1.5rem;
    background: #252525;
    border: 1px solid #333;
    color: #E3DAC9;
    font-size: 0.875rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    border-color: #34D399;
}

.toast-error {
    border-color: #FF4444;
}

/* ============================================
   BACK TO TOP & BUTTONS
   ============================================ */

.back-to-top {
    position: fixed;
    bottom: 6rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    background: #252525;
    border: 1px solid #333;
    color: #E3DAC9;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 30;
}

.back-to-top:hover {
    background: #FF4444;
    border-color: #FF4444;
    color: #121212;
}

.back-to-top.hidden {
    display: none;
}

.retry-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid #FF4444;
    color: #FF4444;
    font-family: 'Pretendard', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.retry-btn:hover {
    background: #FF4444;
    color: #121212;
}

/* ============================================
   KEYBOARD HINTS
   ============================================ */

.kbd {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    background: #252525;
    border: 1px solid #333;
    border-radius: 3px;
    font-family: 'Courier Prime', monospace;
    font-size: 0.7rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

.rib-card {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

.rib-card:nth-child(1) { animation-delay: 0.05s; }
.rib-card:nth-child(2) { animation-delay: 0.1s; }
.rib-card:nth-child(3) { animation-delay: 0.15s; }
.rib-card:nth-child(4) { animation-delay: 0.2s; }
.rib-card:nth-child(5) { animation-delay: 0.25s; }
.rib-card:nth-child(6) { animation-delay: 0.3s; }
.rib-card:nth-child(n+7) { animation-delay: 0.35s; }

/* ============================================
   COMPLETION BAR
   ============================================ */

.card-completion,
.modal-completion {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-completion {
    position: relative;
    background: #1a1a1a;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid #252525;
}

.completion-label {
    font-size: 0.7rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.completion-bar {
    flex: 1;
    height: 6px;
    background: #252525;
    border-radius: 3px;
    overflow: hidden;
}

.completion-bar.large {
    height: 8px;
}

.completion-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF4444, #FF6B9D);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.completion-text,
.completion-percent {
    font-family: 'Courier Prime', monospace;
    font-size: 0.75rem;
    color: #E3DAC9;
    min-width: 35px;
    text-align: right;
}

/* ============================================
   TECH STACK TAGS
   ============================================ */

.card-tech-stack,
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
}

.tech-tag {
    font-family: 'Courier Prime', monospace;
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid #00D9FF;
    color: #00D9FF;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   DEMO BUTTON
   ============================================ */

.demo-btn {
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: 1px solid #34D399;
    color: #34D399;
    font-family: 'Courier Prime', monospace;
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.2s;
}

.demo-btn:hover {
    background: #34D399;
    color: #121212;
}

.demo-btn-large {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: 1px solid #34D399;
    color: #34D399;
    font-family: 'Pretendard', sans-serif;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.demo-btn-large:hover {
    background: #34D399;
    color: #121212;
}

.demo-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-radius: 50%;
    position: relative;
}

.demo-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    border: 4px solid transparent;
    border-left: 6px solid currentColor;
}

/* ============================================
   MODAL SECTIONS
   ============================================ */

.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.section-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    font-family: 'Courier Prime', monospace;
}

.includes-text {
    color: #C4B8A5;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ============================================
   HIDDEN
   ============================================ */

.hidden {
    display: none !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .glitch::before,
    .glitch::after {
        display: none;
    }

    .card-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .card-footer-actions {
        justify-content: space-between;
    }

    .dig-button {
        flex: 1;
        text-align: center;
    }

    .modal-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .modal-actions {
        justify-content: stretch;
    }

    .modal-cta {
        width: 100%;
        text-align: center;
    }

    .share-btn-large {
        flex: 1;
        justify-content: center;
    }
}

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #121212;
}

::-webkit-scrollbar-thumb {
    background: #333;
}

::-webkit-scrollbar-thumb:hover {
    background: #FF4444;
}
