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

body {
    background: #000;
    color: #fff;
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    position: relative;
}

/* 반짝이는 배경 파티클들 */
.sparkles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #fff 0%, transparent 70%);
    border-radius: 50%;
    animation: sparkle-animation 3s infinite ease-in-out;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

@keyframes sparkle-animation {
    0%, 100% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 메인 컨테이너 */
.main-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

/* 아날로그 시계 */
.analog-clock {
    position: relative;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(1deg); }
    66% { transform: translateY(-5px) rotate(-1deg); }
}

.clock-face {
    width: 300px;
    height: 300px;
    border: 4px solid #fff;
    border-radius: 50%;
    position: relative;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.3) 100%);
    box-shadow: 
        0 0 40px rgba(255, 255, 255, 0.3),
        inset 0 0 40px rgba(255, 255, 255, 0.1);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 
            0 0 40px rgba(255, 255, 255, 0.3),
            inset 0 0 40px rgba(255, 255, 255, 0.1);
    }
    to {
        box-shadow: 
            0 0 60px rgba(255, 255, 255, 0.5),
            inset 0 0 50px rgba(255, 255, 255, 0.2);
    }
}

.hour-markers {
    position: absolute;
    width: 100%;
    height: 100%;
}

.hour-mark {
    position: absolute;
    width: 4px;
    height: 30px;
    background: #fff;
    left: 50%;
    top: 8px;
    transform-origin: 50% 142px;
    margin-left: -2px;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.mark-12 { transform: rotate(0deg); }
.mark-1 { transform: rotate(30deg); }
.mark-2 { transform: rotate(60deg); }
.mark-3 { transform: rotate(90deg); }
.mark-4 { transform: rotate(120deg); }
.mark-5 { transform: rotate(150deg); }
.mark-6 { transform: rotate(180deg); }
.mark-7 { transform: rotate(210deg); }
.mark-8 { transform: rotate(240deg); }
.mark-9 { transform: rotate(270deg); }
.mark-10 { transform: rotate(300deg); }
.mark-11 { transform: rotate(330deg); }

.hour-hand, .minute-hand, .second-hand {
    position: absolute;
    left: 50%;
    top: 50%;
    transform-origin: bottom center;
    border-radius: 10px;
}

.hour-hand {
    width: 6px;
    height: 80px;
    background: linear-gradient(to top, #fff, #ccc);
    margin-left: -3px;
    margin-top: -80px;
    z-index: 3;
}

.minute-hand {
    width: 4px;
    height: 110px;
    background: linear-gradient(to top, #fff, #ddd);
    margin-left: -2px;
    margin-top: -110px;
    z-index: 4;
}

.second-hand {
    width: 2px;
    height: 120px;
    background: #ff4444;
    margin-left: -1px;
    margin-top: -120px;
    z-index: 5;
}

/* tick 애니메이션 제거 - JavaScript에서 정확한 위치 계산 */

.center-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 6;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

/* C++ 코드 스타일 시간 표시 */
.cpp-code-time {
    text-align: left;
    animation: code-pulse 3s ease-in-out infinite;
}

@keyframes code-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.code-container {
    background: none;
    border: none;
    border-radius: 0;
    padding: 20px;
    font-family: 'Courier New', 'Monaco', monospace;
    font-size: 1.4em;
    line-height: 1.8;
    box-shadow: none;
    backdrop-filter: none;
    position: relative;
    overflow: visible;
}

.code-container::before {
    display: none;
}

@keyframes border-glow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.code-line {
    margin: 2px 0;
    transition: all 0.3s ease;
}

.code-line:hover {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    padding: 2px 5px;
    margin: 2px -5px;
}

.indent {
    padding-left: 20px;
}

/* C++ 문법 하이라이팅 색상 */
.keyword {
    color: #569cd6;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(86, 156, 214, 0.5);
    animation: keyword-glow 2s ease-in-out infinite alternate;
}

@keyframes keyword-glow {
    from { text-shadow: 0 0 10px rgba(86, 156, 214, 0.5); }
    to { text-shadow: 0 0 15px rgba(86, 156, 214, 0.8); }
}

.type {
    color: #4ec9b0;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(78, 201, 176, 0.5);
}

.property {
    color: #9cdcfe;
    text-shadow: 0 0 8px rgba(156, 220, 254, 0.4);
}

.operator {
    color: #d4d4d4;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(212, 212, 212, 0.3);
}

.bracket {
    color: #ffd700;
    font-weight: bold;
    font-size: 1.1em;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
    animation: bracket-pulse 1s ease-in-out infinite alternate;
}

@keyframes bracket-pulse {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

.number {
    color: #b5cea8;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(181, 206, 168, 0.5);
    animation: number-flash 2s ease-in-out infinite;
    transition: all 0.3s ease;
}

@keyframes number-flash {
    0%, 90% { color: #b5cea8; }
    95% { color: #00ff00; }
    100% { color: #b5cea8; }
}

.string {
    color: #ce9178;
    font-style: italic;
    text-shadow: 0 0 8px rgba(206, 145, 120, 0.4);
    position: relative;
}

/* 특별한 애니메이션 효과 */
.code-line:nth-child(even) {
    animation-delay: 0.1s;
}

.code-line:nth-child(odd) {
    animation-delay: 0.2s;
}

/* 타이핑 효과 */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

.code-container {
    position: relative;
}

.code-container::after {
    display: none;
}

@keyframes cursor-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* 네 모서리 이미지 영역 */
.corner-images {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.corner-image {
    position: absolute;
    width: 150px;
    height: 150px;
    opacity: 0;
    transition: all 0.5s ease;
}

.corner-image.has-image {
    opacity: 1;
    animation: corner-float 4s ease-in-out infinite;
}

@keyframes corner-float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(2deg); }
}

.top-left {
    top: 20px;
    left: 20px;
    animation-delay: 0s;
}

.top-right {
    top: 20px;
    right: 20px;
    animation-delay: 1s;
}

.bottom-left {
    bottom: 20px;
    left: 20px;
    animation-delay: 2s;
}

.bottom-right {
    bottom: 20px;
    right: 20px;
    animation-delay: 3s;
}

.corner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.corner-img:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
}

/* 설정 패널 */
.settings-panel {
    position: fixed;
    top: 50%;
    right: -300px;
    transform: translateY(-50%);
    width: 280px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 20px;
    transition: right 0.3s ease;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.settings-panel.open {
    right: 20px;
}

.settings-panel h3 {
    margin-bottom: 20px;
    text-align: center;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.setting-group {
    margin-bottom: 15px;
}

.setting-group label {
    display: block;
    margin-bottom: 5px;
    color: #ccc;
    font-size: 0.9em;
}

.setting-group input[type="file"] {
    width: 100%;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    color: #fff;
    font-size: 0.8em;
}

.settings-panel button {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.settings-panel button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* 설정 버튼 */
.settings-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 50;
    backdrop-filter: blur(10px);
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .clock-face {
        width: 150px;
        height: 150px;
    }
    
    .time-display {
        font-size: 2em;
    }
    
    .corner-image {
        width: 100px;
        height: 100px;
    }
    
    .settings-panel {
        width: 250px;
    }
}

/* 추가 애니메이션 효과 */
@keyframes rainbow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.corner-image.rainbow {
    animation: rainbow 10s linear infinite, corner-float 4s ease-in-out infinite;
}

/* 로딩 애니메이션 */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.main-container {
    animation: fade-in 1s ease-out;
}
