/* 다크모드 공통 스타일 */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* 다크모드 토글 버튼 스타일 */
#darkModeToggle {
    position: relative;
    overflow: hidden;
}

#darkModeToggle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

#darkModeToggle:hover::before {
    width: 100px;
    height: 100px;
}

#darkModeToggle:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

#darkModeIcon {
    transition: transform 0.3s ease, color 0.3s ease;
}

#darkModeToggle:hover #darkModeIcon {
    transform: rotate(20deg) scale(1.1);
}

/* 다크모드 토스트 알림 */
.dark-mode-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.dark-mode-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.dark .dark-mode-toast {
    background: rgba(255, 255, 255, 0.9);
    color: #1f2937;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* 다크모드 기본 스타일 */
html.dark,
.dark,
html.dark body,
.dark body {
    background-color: #1f2937;
    color: #f9fafb;
}

html.dark .bg-white, .dark .bg-white { background-color: #374151; }
html.dark .bg-gray-50, .dark .bg-gray-50 { background-color: #4b5563; }
html.dark .bg-gray-100, .dark .bg-gray-100 { background-color: #6b7280; }
html.dark .bg-gray-200, .dark .bg-gray-200 { background-color: #9ca3af; }

html.dark .text-black, .dark .text-black,
html.dark .text-gray-900, .dark .text-gray-900 { color: #f9fafb; }
html.dark .text-gray-800, .dark .text-gray-800 { color: #e5e7eb; }
html.dark .text-gray-700, .dark .text-gray-700 { color: #d1d5db; }
html.dark .text-gray-600, .dark .text-gray-600 { color: #9ca3af; }
html.dark .text-gray-500, .dark .text-gray-500 { color: #6b7280; }
html.dark .text-gray-400, .dark .text-gray-400 { color: #9ca3af; }

html.dark .border-gray-300, .dark .border-gray-300,
html.dark .border-gray-100, .dark .border-gray-100,
html.dark .divide-gray-100 > * + *, .dark .divide-gray-100 > * + * {
    border-color: #6b7280;
}

/* 그림자 다크모드 스타일 */
.dark .shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
}

.dark .shadow {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
}

.dark .shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

.dark .shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

.dark .shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

/* 카드 다크모드 스타일 */
.dark .bg-white\/10 {
    background-color: rgba(255, 255, 255, 0.1);
}

.dark .bg-white\/20 {
    background-color: rgba(255, 255, 255, 0.2);
}

.dark .bg-white\/5 {
    background-color: rgba(255, 255, 255, 0.05);
}

/* 호버 효과 다크모드 */
.dark .hover\:bg-gray-50:hover {
    background-color: #4b5563;
}

.dark .hover\:bg-gray-100:hover {
    background-color: #6b7280;
}

.dark .hover\:bg-gray-200:hover {
    background-color: #9ca3af;
}

/* 입력 필드 다크모드 */
.dark input[type="text"],
.dark input[type="email"],
.dark input[type="password"],
.dark input[type="date"],
.dark textarea,
.dark select {
    background-color: #4b5563;
    border-color: #6b7280;
    color: #f9fafb;
}

.dark input[type="text"]:focus,
.dark input[type="email"]:focus,
.dark input[type="password"]:focus,
.dark input[type="date"]:focus,
.dark textarea:focus,
.dark select:focus {
    background-color: #374151;
    border-color: #3b82f6;
}

.dark input::placeholder,
.dark textarea::placeholder {
    color: #9ca3af;
}

/* 버튼 다크모드 */
.dark .bg-blue-600 {
    background-color: #2563eb;
}

.dark .bg-blue-600:hover {
    background-color: #1d4ed8;
}

.dark .bg-green-600 {
    background-color: #059669;
}

.dark .bg-green-600:hover {
    background-color: #047857;
}

.dark .bg-red-600 {
    background-color: #dc2626;
}

.dark .bg-red-600:hover {
    background-color: #b91c1c;
}

/* 마크다운 콘텐츠 다크모드 */
.dark .markdown-content {
    color: #e5e7eb;
}

.dark .markdown-content h1,
.dark .markdown-content h2,
.dark .markdown-content h3 {
    color: #f9fafb;
}

.dark .markdown-content h1 {
    border-bottom-color: #6b7280;
}

.dark .markdown-content blockquote {
    background-color: #374151;
    border-left-color: #3b82f6;
}

.dark .markdown-content code {
    background-color: #374151;
    color: #e5e7eb;
}

.dark .markdown-content pre {
    background-color: #111827;
}

.dark .markdown-content table th {
    background-color: #374151;
}

.dark .markdown-content table th,
.dark .markdown-content table td {
    border-color: #6b7280;
}