:root {
    --primary-color: #6366F1;
    --secondary-color: #4F46E5;
    --background-color: #0F172A;
    --secondary-bg: #1E293B;
    --text-color: #E2E8F0;
    --gray-light: #334155;
    --gray-dark: #94A3B8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 기본 폰트 및 모바일 최적화 */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    font-size: 16px;
}

*, *:before, *:after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    padding-top: 4rem;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* 헤더 스타일 */
header {
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
    padding: 0.75rem 0;
}

header .container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 2.5rem;
}



.logo {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.025em;
}

/* 메인 섹션 스타일 */
.hero {
    padding: 5rem 0 6rem;
    background: var(--background-color);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--gray-light);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 25% 25%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(79, 70, 229, 0.15) 0%, transparent 50%),
        linear-gradient(45deg, rgba(99, 102, 241, 0.1) 0%, rgba(79, 70, 229, 0.1) 100%);
    animation: gradientMove 15s ease-in-out infinite alternate;
    z-index: 1;
    transform-origin: center center;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236366f1' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.15;
    z-index: 1;
    animation: patternMove 30s linear infinite;
    pointer-events: none;
}

@keyframes gradientMove {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes patternMove {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 100% 100%;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 48rem;
    margin: 0 auto;
    text-align: center;
    padding: 2rem 1rem;
}

.hero h1 {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.025em;
    perspective: 1000px;
    transform-style: preserve-3d;
    animation: 
        textGradient 8s ease infinite,
        glowText 1s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

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

@keyframes glowText {
    0% {
        opacity: 0;
        transform: perspective(1000px) rotateX(30deg) translateY(50px) translateZ(-200px);
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        transform: perspective(1000px) rotateX(0) translateY(0) translateZ(0);
        filter: blur(0);
    }
}



.hero p {
    font-size: 1.25rem;
    color: var(--gray-dark);
    line-height: 1.8;
    margin: 0 auto;
    max-width: 36rem;
    animation: fadeScale 0.8s cubic-bezier(0.215, 0.61, 0.355, 1) 0.3s forwards;
    opacity: 0;
    transform: perspective(1000px);
}

@keyframes fadeScale {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 기능 섹션 스타일 */
.features {
    padding: 6rem 0;
    background-color: var(--background-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    padding: 2rem 0;
}

.feature-card {
    background: var(--secondary-bg);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--gray-light);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-card .btn {
    margin-top: auto;
}

.feature-card:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.feature-card p {
    color: var(--gray-dark);
    line-height: 1.75;
}

/* 버튼 스타일 */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* 푸터 스타일 */
.footer {
    background-color: var(--secondary-bg);
    padding: 2rem 0;
    text-align: center;
    color: var(--gray-dark);
    border-top: 1px solid var(--gray-light);
}

/* 기능 상세 섹션 */
.feature-detail {
    padding: 8rem 0;
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--gray-light);
}

.feature-detail::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle at 0% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
}

.feature-detail:nth-child(even) {
    background: var(--secondary-bg);
}

.feature-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.feature-detail-text {
    padding: 2rem;
}

.feature-detail-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-detail-text h3 {
    color: var(--gray-dark);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.feature-detail-list {
    list-style: none;
    margin: 2rem 0;
}

.feature-detail-list li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.feature-detail-list li i {
    color: var(--primary-color);
    margin-right: 1rem;
    width: 1.5rem;
    height: 1.5rem;
    line-height: 1.5rem;
    text-align: center;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    font-style: normal;
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

.feature-detail-note {
    margin-top: 1.5rem;
    color: var(--gray-dark);
    font-size: 0.875rem;
    font-style: italic;
}

.feature-detail-image {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease-in-out;
}

.feature-detail-image:hover {
    transform: translateY(-10px);
}

.feature-detail-image img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.feature-detail:nth-child(even) .feature-detail-image img {
    filter: drop-shadow(0 4px 6px rgba(99, 102, 241, 0.2));
}

/* 미리듣기 페이지 */
.preview-form {
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    gap: 0.75rem;
    flex-direction: column;
}

.input-group input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 1px solid var(--gray-light);
    border-radius: 0.75rem;
    background: var(--secondary-bg);
    color: var(--text-color);
    font-size: 1rem;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.input-group button {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    border-radius: 0.75rem;
}

.help-text {
    font-size: 0.875rem;
    color: var(--gray-dark);
    margin-top: 0.75rem;
    text-align: center;
}

@media (min-width: 640px) {
    .input-group {
        flex-direction: row;
    }

    .input-group input {
        flex: 1;
    }

    .input-group button {
        width: auto;
        min-width: 120px;
    }

    .help-text {
        text-align: left;
    }
}
.preview-player {
    margin-bottom: 2rem;
    background: var(--secondary-bg);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid var(--gray-light);
}

.listener-info {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--gray-dark);
}

.listener-info i {
    color: var(--primary-color);
    margin-right: 0.25rem;
}

.live-image-container {
    margin-top: 1rem;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.live-image-container.expanded {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    padding: 0;
    margin: 0;
    touch-action: none;
}

.live-image {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    display: block;
}

.live-image-container.expanded .live-image {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 0;
    object-fit: contain;
}

.error-message {
    display: none;
    align-items: center;
    gap: 0.5rem;
    color: #EF4444;
    margin-top: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: rgba(239, 68, 68, 0.1);
    font-size: 0.875rem;
}

.error-message i {
    font-size: 1rem;
}

.preview-player .error-message {
    margin: 0.75rem 0 0 0;
}

.player-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.profile-image {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.dj-info {
    flex: 1;
}

.dj-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.dj-info p {
    font-size: 0.875rem;
    color: var(--gray-dark);
}

.btn-play {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-play:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.btn-play i {
    font-size: 1.25rem;
}

#audioPlayer {
    display: none;
}

.search-results {
    margin-top: 2rem;
}

.search-results h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.dj-list {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.dj-card {
    background: var(--secondary-bg);
    border-radius: 1rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--gray-light);
}

.dj-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.dj-card img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.dj-card-info {
    flex: 1;
}

.dj-card-info h4 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.dj-card-info p {
    font-size: 0.875rem;
    color: var(--gray-dark);
}

.dj-card .live-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    margin-left: auto;
}

.preview-page main {
    padding: 2rem 0;
}

.preview-section {
    max-width: 960px;
    margin: 0 auto;
    padding: 3rem 2rem 2rem 2rem;
}

.preview-container,
.preview-player,
.search-results {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
    background: var(--secondary-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--gray-light);
}

.preview-container {
    text-align: left;
}

.preview-container h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.preview-container .description {
    font-size: 0.875rem;
    color: var(--gray-dark);
    margin-bottom: 1.5rem;
}

.preview-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.preview-section .description {
    color: var(--gray);
    margin-bottom: 2rem;
}

.preview-form {
    background: var(--background-light);
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.input-group input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-light);
    border-radius: 0.5rem;
    background: var(--background);
    color: var(--text);
}

.help-text {
    font-size: 0.875rem;
    color: var(--gray);
}

.preview-player {
    background: var(--background-light);
    padding: 2rem;
    border-radius: 1rem;
    margin-top: 2rem;
}

.player-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 0.25rem;
}

.btn-play {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-play:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

.btn-play i {
    font-size: 1.25rem;
}

.profile-image-container {
    position: relative;
    cursor: pointer;
}

.profile-image {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    object-fit: cover;
}

.profile-image-container.expanded {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    padding: 1rem;
    margin: 0;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.profile-image-container.expanded .profile-image {
    width: auto;
    height: auto;
    max-width: 90%;
    max-height: 90vh;
    border-radius: 0;
    object-fit: contain;
}

.profile-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.dj-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.dj-info p {
    color: var(--gray);
}

.player-controls audio {
    width: 100%;
    margin-top: 1rem;
}

.error-message {
    background: var(--error-bg);
    color: var(--error);
    padding: 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 반응형 디자인 */
@media (max-width: 640px) {
    .profile-image-container.expanded {
        padding: 0;
    }

    .profile-image-container.expanded .profile-image {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
        object-fit: contain;
    }
    
    /* 모바일에서 터치 시 반응성 개선 */
    .profile-image-container {
        -webkit-tap-highlight-color: transparent;
    }
    
    .profile-image-container:active {
        opacity: 0.9;
    }
    .container {
        padding: 0 1.5rem;
    }
    
    .preview-section {
        padding: 0;
    }

    .preview-section h1 {
        font-size: 1.75rem;
    }

    .preview-section .description {
        font-size: 1rem;
    }

    .preview-player {
        padding: 1rem;
    }

    .player-header {
        gap: 1rem;
    }

    .profile-image {
        width: 48px;
        height: 48px;
    }

    .dj-info h3 {
        font-size: 1.125rem;
    }

    .btn-play {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 1280px) {
    .container {
        max-width: 100%;
        padding: 0 2rem;
    }
}

@media (max-width: 1024px) {
    .feature-detail-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .feature-detail-text {
        padding: 1rem;
        text-align: center;
    }

    .feature-detail-list li {
        justify-content: center;
    }

    .feature-detail-image {
        margin: 0 auto;
        max-width: 80%;
    }

    .hero-content {
        max-width: 42rem;
    }

    .hero h1 {
        font-size: 3.25rem;
    }

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

@media (max-width: 768px) {
    .feature-detail {
        padding: 4rem 0;
    }

    .feature-detail-text h2 {
        font-size: 2rem;
    }

    .feature-detail-text h3 {
        font-size: 1.125rem;
    }

    .feature-detail-list {
        margin: 1.5rem 0;
    }

    .container {
        padding: 0 1.5rem;
    }

    .hero {
        padding: 6rem 0 3rem;
    }

    .hero-content {
        padding: 1.5rem 1rem;
    }

    .hero h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .hero p {
        font-size: 1.125rem;
        margin-bottom: 2rem;
    }

    .features {
        padding: 4rem 0;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 5rem 0 2rem;
    }

    .hero-content {
        padding: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .features {
        padding: 3rem 0;
    }

    .feature-card {
        padding: 1.25rem;
    }

    .feature-card h3 {
        font-size: 1.25rem;
    }

    .feature-card p {
        font-size: 0.875rem;
    }

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

/* 랭킹 섹션 - 컴팩트하고 깔끔한 디자인 */
.ranking-section {
    padding: 4rem 0;
    background: var(--background-color);
    width: 100%;
    min-height: 400px;
}

/* 기본 랭킹 스타일 강제 적용 */
.ranking-section * {
    box-sizing: border-box;
}

.section-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.header-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

.lock-button, .search-button {
    background: var(--secondary-bg);
    border: 1px solid var(--gray-light);
    border-radius: 0.5rem;
    padding: 0.5rem;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
}

.lock-button:hover, .search-button:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.lock-button.unlocked {
    color: #22C55E;
}

.lock-button.unlocked:hover {
    background: #22C55E;
    color: white;
}

.section-subtitle {
    text-align: center;
    color: var(--gray-dark);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.ranking-tabs {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 2rem;
    background: var(--secondary-bg);
    padding: 0.25rem;
    border-radius: 0.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
}

.ranking-tab {
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--gray-dark);
    font-weight: 500;
    font-size: 0.875rem;
}

.ranking-tab:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.ranking-tab.active {
    background: var(--primary-color);
    color: white;
}

.ranking-content {
    max-width: 800px;
    margin: 0 auto;
}

.ranking-scroll-container {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid var(--gray-light);
    border-radius: 0.5rem;
    background: var(--secondary-bg);
}

.ranking-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.ranking-scroll-container::-webkit-scrollbar-track {
    background: transparent;
}

.ranking-scroll-container::-webkit-scrollbar-thumb {
    background: var(--gray-light);
    border-radius: 3px;
}

.ranking-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.ranking-grid {
    display: grid;
    gap: 0;
}

.ranking-loading {
    text-align: center;
    padding: 2rem;
    color: var(--gray-dark);
}

.ranking-loading i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    animation: spin 1s linear infinite;
}

.ranking-item {
    display: grid;
    grid-template-columns: 3rem 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-light);
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-item:hover {
    background: rgba(99, 102, 241, 0.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-left: 3px solid var(--primary-color);
}

.ranking-rank {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
    min-width: 2rem;
}

.ranking-rank.top-1 { 
    color: #FFD700; 
    font-weight: 700;
}
.ranking-rank.top-2 { 
    color: #C0C0C0; 
    font-weight: 700;
}
.ranking-rank.top-3 { 
    color: #CD7F32; 
    font-weight: 700;
}

/* 순위변동 색상 */
.text-green { color: #10B981; }
.text-red { color: #EF4444; }
.text-blue { color: #3B82F6; }

.ranking-info {
    min-width: 0;
    overflow: hidden;
}

.ranking-nickname-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.125rem;
    min-height: 1.2rem;
    gap: 0.5rem;
}

.ranking-nickname {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.ranking-details {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--gray-dark);
}

.ranking-score, .ranking-subscribers {
    display: flex;
    align-items: center;
    gap: 0.125rem;
}

.ranking-score i, .ranking-subscribers i {
    color: var(--primary-color);
    font-size: 0.625rem;
}

.ranking-engagement {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    color: var(--gray-dark);
}

/* 스푼 수 블러 효과 */
.real-score-value {
    transition: filter 0.3s ease;
}

.real-score-value.blurred {
    filter: blur(4px);
    -webkit-filter: blur(4px);
    user-select: none;
    pointer-events: none;
}

.ranking-engagement i.fa-heart {
    color: #EF4444;
    font-size: 0.625rem;
    margin-right: 0.25rem;
}

/* 생일 축하 효과 */
.ranking-item.birthday-user {
    background: linear-gradient(45deg, rgba(255, 215, 0, 0.1), rgba(255, 192, 203, 0.1), rgba(135, 206, 235, 0.1));
    background-size: 400% 400%;
    animation: birthdayShine 3s ease-in-out infinite;
    border: 2px solid transparent;
    border-image: linear-gradient(45deg, #FFD700, #FF69B4, #87CEEB) 1;
    position: relative;
    overflow: hidden;
}

.ranking-item.birthday-user::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: birthdaySparkle 4s linear infinite;
    pointer-events: none;
}

.birthday-message {
    color: #FF69B4;
    font-weight: 600;
    font-size: 0.7rem;
    text-shadow: 0 0 5px rgba(255, 105, 180, 0.5);
    animation: birthdayPulse 2s ease-in-out infinite;
    white-space: nowrap;
    flex-shrink: 0;
}

@keyframes birthdayShine {
    0%, 100% {
        background-position: 0% 50%;
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    }
    50% {
        background-position: 100% 50%;
        box-shadow: 0 0 20px rgba(255, 105, 180, 0.5);
    }
}

@keyframes birthdaySparkle {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(0deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(360deg);
    }
}

@keyframes birthdayPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* 사랑해 효과 */
.ranking-item.love-user {
    background: linear-gradient(45deg, rgba(255, 75, 87, 0.1), rgba(255, 20, 147, 0.1), rgba(220, 20, 60, 0.1));
    background-size: 400% 400%;
    animation: loveShine 2s ease-in-out infinite;
    border: 2px solid transparent;
    border-image: linear-gradient(45deg, #FF4B57, #FF1493, #DC143C) 1;
    position: relative;
    overflow: hidden;
}

.ranking-item.love-user::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: loveSparkle 3s linear infinite;
    pointer-events: none;
}

.love-message {
    color: #FF1493;
    font-weight: 600;
    font-size: 0.7rem;
    text-shadow: 0 0 5px rgba(255, 20, 147, 0.5);
    animation: lovePulse 1.5s ease-in-out infinite;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 생일 + 사랑해 둘 다인 경우 */
.ranking-item.birthday-user.love-user {
    background: linear-gradient(45deg, rgba(255, 215, 0, 0.15), rgba(255, 192, 203, 0.15), rgba(255, 75, 87, 0.15), rgba(135, 206, 235, 0.15));
    border-image: linear-gradient(45deg, #FFD700, #FF69B4, #FF4B57, #87CEEB) 1;
    animation: specialShine 2.5s ease-in-out infinite;
}

.special-message {
    color: #FF1493;
    font-weight: 600;
    font-size: 0.7rem;
    text-shadow: 0 0 5px rgba(255, 20, 147, 0.5);
    animation: specialPulse 2s ease-in-out infinite;
    white-space: nowrap;
    flex-shrink: 0;
}

@keyframes loveShine {
    0%, 100% {
        background-position: 0% 50%;
        box-shadow: 0 0 10px rgba(255, 75, 87, 0.3);
    }
    50% {
        background-position: 100% 50%;
        box-shadow: 0 0 20px rgba(255, 20, 147, 0.5);
    }
}

@keyframes loveSparkle {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(0deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(360deg);
    }
}

@keyframes lovePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

@keyframes specialShine {
    0%, 100% {
        background-position: 0% 50%;
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    }
    33% {
        background-position: 50% 50%;
        box-shadow: 0 0 20px rgba(255, 105, 180, 0.5);
    }
    66% {
        background-position: 100% 50%;
        box-shadow: 0 0 25px rgba(255, 75, 87, 0.6);
    }
}

@keyframes specialPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.08);
        opacity: 0.85;
    }
}

/* 랭킹 액션 버튼들 */
.ranking-actions {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.info-button, .history-button {
    background: var(--secondary-bg);
    border: 1px solid var(--gray-light);
    border-radius: 0.25rem;
    padding: 0.25rem;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.75rem;
    font-size: 0.7rem;
}

.info-button:hover, .history-button:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.info-button {
    color: #10B981;
}

.info-button:hover {
    background: #10B981;
}

/* 순위변동 스타일 */
.ranking-change {
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    min-width: 3rem;
    display: flex;
    align-items: center;
    gap: 0.125rem;
    justify-content: center;
}

.ranking-change.up { 
    background: #22C55E;
    color: white;
}

.ranking-change.down { 
    background: #EF4444;
    color: white;
}

.ranking-change.new { 
    background: #3B82F6;
    color: white;
}

.ranking-change.same { 
    background: var(--gray-light);
    color: var(--gray-dark);
}

.ranking-change i {
    font-size: 0.625rem;
}

/* 기록 모달 스타일 */
.history-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.history-modal.show {
    opacity: 1;
}

.history-modal.closing {
    opacity: 0;
}

.history-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.history-modal-content {
    background: var(--secondary-bg);
    border-radius: 1rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    border: 1px solid var(--gray-light);
    position: relative;
    z-index: 1;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.history-modal.show .history-modal-content {
    transform: scale(1);
}

.history-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-light);
}

.history-modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.history-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-dark);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.history-modal-close:hover {
    background: var(--gray-light);
    color: var(--text-color);
}

.history-modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.history-category {
    margin-bottom: 2rem;
}

.history-category:last-child {
    margin-bottom: 0;
}

.history-category h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.history-items {
    display: grid;
    gap: 0.5rem;
}

.history-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--background-color);
    border-radius: 0.5rem;
    border: 1px solid var(--gray-light);
    transition: all 0.2s ease;
}

.history-item:hover {
    background: rgba(99, 102, 241, 0.05);
    border-color: var(--primary-color);
}

.history-rank {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
    min-width: 3rem;
}

.history-score {
    color: var(--text-color);
    font-size: 0.85rem;
}

.history-date {
    color: var(--gray-dark);
    font-size: 0.75rem;
    text-align: right;
    min-width: 5rem;
}

/* 상위 3명 하이라이트 */
.ranking-item.top-1,
.ranking-item.top-2,
.ranking-item.top-3 {
    background: rgba(99, 102, 241, 0.03);
    border-left: 3px solid;
}

.ranking-item.top-1 {
    border-left-color: #FFD700;
}

.ranking-item.top-2 {
    border-left-color: #C0C0C0;
}

.ranking-item.top-3 {
    border-left-color: #CD7F32;
}

/* 검색 하이라이트 효과 */
.ranking-item.highlight {
    background: rgba(255, 215, 0, 0.2) !important;
    border: 2px solid #FFD700 !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5) !important;
    animation: searchPulse 1s ease-in-out 3;
}

@keyframes searchPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 25px rgba(255, 215, 0, 0.8);
    }
}

/* 애니메이션 */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ranking-item.new-item {
    opacity: 0;
    transform: translateY(10px);
    animation: slideInUp 0.3s ease forwards;
}

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.load-more-button {
    display: block;
    width: 100%;
    padding: 0.75rem;
    margin-top: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.load-more-button:hover {
    background: var(--secondary-color);
}

.load-more-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-light);
    color: var(--text-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 랭킹 반응형 */
@media (max-width: 768px) {
    .ranking-section {
        padding: 3rem 0;
    }
    
    .section-header {
        gap: 0.75rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .lock-button, .search-button {
        min-width: 2rem;
        height: 2rem;
        padding: 0.375rem;
    }
    
    .header-buttons {
        gap: 0.375rem;
    }
    
    .ranking-tabs {
        max-width: 100%;
        gap: 0.125rem;
    }
    
    .ranking-tab {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .ranking-item {
        padding: 0.625rem 0.75rem;
        grid-template-columns: 2.5rem 1fr auto;
        gap: 0.5rem;
    }
    
    .info-button, .history-button {
        min-width: 1.5rem;
        height: 1.5rem;
        font-size: 0.65rem;
    }
    
    .ranking-actions {
        gap: 0.25rem;
    }
    
    .ranking-rank {
        font-size: 1rem;
        min-width: 2rem;
    }
    
    .ranking-nickname-row {
        gap: 0.375rem;
        min-height: 1.1rem;
    }
    
    .ranking-nickname {
        font-size: 0.85rem;
    }
    
    .birthday-message {
        font-size: 0.65rem;
    }
    
    .love-message {
        font-size: 0.65rem;
    }
    
    .special-message {
        font-size: 0.65rem;
    }
    
    .ranking-details {
        gap: 0.5rem;
        font-size: 0.7rem;
    }
    
    .ranking-engagement {
        gap: 0.125rem;
        font-size: 0.65rem;
    }
    
    .ranking-change {
        min-width: 2.5rem;
        font-size: 0.7rem;
        padding: 0.1rem 0.25rem;
    }
}

@media (max-width: 480px) {
    .section-header {
        gap: 0.5rem;
    }
    
    .lock-button, .search-button {
        min-width: 1.75rem;
        height: 1.75rem;
        padding: 0.25rem;
    }
    
    .header-buttons {
        gap: 0.25rem;
    }
    
    .ranking-tabs {
        flex-direction: column;
        gap: 0.125rem;
    }
    
    .ranking-tab {
        width: 100%;
        text-align: center;
    }
    
    .ranking-item {
        grid-template-columns: 2rem 1fr 2rem;
        gap: 0.375rem;
        padding: 0.5rem 0.625rem;
    }
    
    .info-button, .history-button {
        min-width: 1.25rem;
        height: 1.25rem;
        font-size: 0.6rem;
    }
    
    .ranking-actions {
        gap: 0.125rem;
        flex-direction: column;
    }
    
    .history-modal-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .history-modal-header {
        padding: 1rem;
    }
    
    .history-modal-body {
        padding: 1rem;
    }
    
    .history-item {
        grid-template-columns: 1fr;
        gap: 0.25rem;
        text-align: center;
    }
    
    .history-rank {
        font-size: 0.8rem;
    }
    
    .history-score {
        font-size: 0.75rem;
    }
    
    .history-date {
        font-size: 0.7rem;
        text-align: center;
    }
}

/* 일별 기록 모달 스타일 */
.daily-history-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.daily-history-modal.show {
    opacity: 1;
}

.daily-history-modal.closing {
    opacity: 0;
}

.daily-history-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.daily-history-modal-content {
    background: var(--secondary-bg);
    border-radius: 1rem;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    border: 1px solid var(--gray-light);
    position: relative;
    z-index: 1;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.daily-history-modal.show .daily-history-modal-content {
    transform: scale(1);
}

.daily-history-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-light);
}

.daily-history-modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.daily-history-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-dark);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.daily-history-modal-close:hover {
    background: var(--gray-light);
    color: var(--text-color);
}

.daily-history-modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.daily-history-items {
    display: grid;
    gap: 0.75rem;
}

.daily-history-item {
    display: grid;
    grid-template-columns: 100px 80px 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--background-color);
    border-radius: 0.5rem;
    border: 1px solid var(--gray-light);
    transition: all 0.2s ease;
}

.daily-history-item:hover {
    background: rgba(99, 102, 241, 0.05);
    border-color: var(--primary-color);
}

.daily-history-date {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.daily-history-rank {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
    text-align: center;
}

.daily-history-score {
    color: var(--text-color);
    font-size: 0.85rem;
    line-height: 1.3;
}

.daily-history-score .real-score-value {
    font-size: 0.75rem;
    color: var(--gray-dark);
    display: inline-block;
    margin-top: 0.125rem;
}

.daily-history-updown {
    text-align: right;
    font-size: 0.8rem;
    font-weight: 600;
}

.updown-up {
    color: #22C55E;
}

.updown-down {
    color: #EF4444;
}

.updown-new {
    color: #3B82F6;
}

.updown-same {
    color: var(--gray-dark);
}

/* 모바일 반응형 - 일별 기록 모달 */
@media (max-width: 768px) {
    .daily-history-modal-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .daily-history-modal-header {
        padding: 1rem;
    }
    
    .daily-history-modal-body {
        padding: 1rem;
    }
    
    .daily-history-item {
        grid-template-columns: 80px 60px 1fr;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .daily-history-updown {
        grid-column: 1 / -1;
        text-align: center;
        margin-top: 0.5rem;
        border-top: 1px solid var(--gray-light);
        padding-top: 0.5rem;
    }
    
    .daily-history-date {
        font-size: 0.8rem;
    }
    
    .daily-history-rank {
        font-size: 0.8rem;
    }
    
    .daily-history-score {
        font-size: 0.75rem;
        line-height: 1.2;
    }
    
    .daily-history-score .real-score-value {
        font-size: 0.65rem;
        margin-top: 0.1rem;
    }
    
    .ranking-rank {
        font-size: 0.9rem;
    }
    
    .ranking-nickname-row {
        gap: 0.25rem;
        min-height: 1rem;
    }
    
    .ranking-nickname {
        font-size: 0.8rem;
    }
    
    .birthday-message {
        font-size: 0.6rem;
    }
    
    .love-message {
        font-size: 0.6rem;
    }
    
    .special-message {
        font-size: 0.6rem;
    }
    
    .ranking-details {
        font-size: 0.65rem;
        gap: 0.375rem;
    }
    
    .ranking-engagement {
        gap: 0.125rem;
        font-size: 0.6rem;
    }
    
    .ranking-change {
        min-width: 2rem;
        font-size: 0.65rem;
    }
}
