@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg-color: #1a1a2e;
    --primary-container-bg: #16213e;
    --secondary-container-bg: rgba(255, 255, 255, 0.05);
    --text-color: #e0e0e0;
    --heading-color: #ffffff;
    --accent-color: #00aaff;
    --accent-gradient: linear-gradient(45deg, #00aaff, #aa00ff);
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 170, 255, 0.2);
}

html {
    height: 100%;
    font-size: 16px;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', 'Pretendard', sans-serif, Arial, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    padding: 0;
    margin: 0;
    background-color: var(--bg-primary, #0a0a0a);
    color: var(--text-primary, #f0f0f0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

*:focus {
  /* outline: 2px solid var(--primary-color, #6a00ff);
  outline-offset: 2px; */
}

a {
    color: var(--primary-color, #6a00ff);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--primary-hover, #5a00e0);
    text-decoration: underline;
}

.main-header .logo a:hover {
    text-decoration: none;
}
.main-header .logo a {
    display:flex;
    align-items: center;
    gap:7px;
    justify-content: center;
}

input, textarea, button {
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6, p {
    margin: 0;
}

button {
    cursor: pointer;
    padding: 0;
    margin: 0;
    background-color: transparent;
    border: 0;
    color: inherit;
}

/* Alignments */
.align-left { text-align: left !important; }
.align-right { text-align: right !important; }
.align-center { text-align: center !important; }

/* Font Sizes */
.fnt-sz-sm { font-size: 0.875rem; } /* 14px */
.fnt-sz-base { font-size: 1rem; } /* 16px */
.fnt-sz-lg { font-size: 1.125rem; } /* 18px */
.fnt-sz-xl { font-size: 1.25rem; } /* 20px */
.fnt-sz-2xl { font-size: 1.5rem; } /* 24px */
.fnt-sz-3xl { font-size: 1.875rem; } /* 30px */

/* Margins */
.m-0 { margin: 0; }
.mt-1 { margin-top: 0.25rem; }
.mb-1 { margin-bottom: 0.25rem; }
.ml-1 { margin-left: 0.25rem; }
.mr-1 { margin-right: 0.25rem; }

.mt-2 { margin-top: 0.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.ml-2 { margin-left: 0.5rem; }
.mr-2 { margin-right: 0.5rem; }

.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.ml-4 { margin-left: 1rem; }
.mr-4 { margin-right: 1rem; }

.mt-8 { margin-top: 2rem; }
.mb-8 { margin-bottom: 2rem; }
.ml-8 { margin-left: 2rem; }
.mr-8 { margin-right: 2rem; }

.mt-16 { margin-top: 4rem; }
.mb-16 { margin-bottom: 4rem; }
.ml-16 { margin-left: 4rem; }
.mr-16 { margin-right: 4rem; }

/* Paddings */
.p-0 { padding: 0; }
.pt-1 { padding-top: 0.25rem; }
.pb-1 { padding-bottom: 0.25rem; }
.pl-1 { padding-left: 0.25rem; }
.pr-1 { padding-right: 0.25rem; }

.pt-2 { padding-top: 0.5rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pl-2 { padding-left: 0.5rem; }
.pr-2 { padding-right: 0.5rem; }

.pt-4 { padding-top: 1rem; }
.pb-4 { padding-bottom: 1rem; }
.pl-4 { padding-left: 1rem; }
.pr-4 { padding-right: 1rem; }

.pt-8 { padding-top: 2rem; }
.pb-8 { padding-bottom: 2rem; }
.pl-8 { padding-left: 2rem; }
.pr-8 { padding-right: 2rem; }

.pt-16 { padding-top: 4rem; }
.pb-16 { padding-bottom: 4rem; }
.pl-16 { padding-left: 4rem; }
.pr-16 { padding-right: 4rem; }

/* Display & Flexbox */
.d-none { display: none !important; }
.d-block { display: block; }
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* Common Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md, 0.75rem);
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--bg-gradient, linear-gradient(135deg, #6a00ff 0%, #ff00c8 100%));
    color: white;
    box-shadow: 0 4px 15px rgba(106, 0, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(106, 0, 255, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary, #f0f0f0);
    border-color: var(--border-color, #333333);
}

.btn-secondary:hover {
    background: var(--bg-secondary, #1a1a1a);
    border-color: var(--text-primary, #f0f0f0);
}

.mgl-8 {margin-left:8px;}
.mgl-10 {margin-left:10px;}
.mgl-15 {margin-left:15px;}
.mgl-20 {margin-left:20px !important;}
.mgl-25 {margin-left:25px}
.mgl-30 {margin-left:30px;}
.mgl-40 {margin-left:40px;}
.mgl-50 {margin-left:50px;}
.mgr-5 {margin-right:5px;}
.mgr-7 {margin-right:7px;}
.mgr-10 {margin-right:10px;}
.mgr-20 {margin-right:20px;}
.mgr-30 {margin-right:30px;}
.mgr-40 {margin-right:40px;}

.mgb-auto {margin-bottom:auto !important;}

.pd-5 {padding:5px;}
.pd-10 {padding:10px;}
.pd-20 {padding:20px;}
.pdt-5 {padding-top:5px !important;}
.pdt-10 {padding-top:10px !important;}
.pdt-20 {padding-top:20px !important;}
.pdb-10 {padding-bottom:10px !important;}
.pdb-20 {padding-bottom:20px !important;}
.pdb-30 {padding-bottom:30px;}
.pdlr-3 {padding:0 3px;}
.pdtb-10 {padding:10px 0px !important;}
.pdr-0 {padding-right:0;}
.pdl-20 {padding-left:20px;}
.pdb-50 {padding-bottom:50px;}

.inp-required {color:red;}

/* 페이지 공통 */
.page-container {
  display:flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  width:100%;
  min-height:100vh;
}
.page-container .page-wrap {
  position:relative;
  width:100%;
  max-width: 1320px;
  background:#fff;
  flex:1;
  display:flex;
  flex-direction: column;
}

/* --- Header Styles --- */
.main-header {
    background-color: var(--primary-container-bg);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.header-left-section {
    display: flex;
    align-items: center;
    gap: 30px; /* 로고와 메뉴 사이 간격 */
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;
    gap: 30px; /* 메뉴와 사용자 정보 사이 간격 */
}

.main-header .logo h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.main-header .logo h1 .gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 800;
    font-size: large;
    transition: color 0.3s ease;
}

.main-nav ul li a:hover {
    color: var(--accent-color);
}

.main-nav ul li a:focus {
    outline: none;
}

/* User Info / Auth Styles */
.user-info, .user-auth {
    display: flex;
    align-items: center;
    gap: 15px; /* 간격 조정 */
}

.image-count-display {
    background-color: var(--secondary-bg, #1e1e1e);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary, #b0b0b0);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

}

.image-count-display .count {
    font-weight: 700;
    color: var(--accent-color, #6a00ff);
    font-size: 1rem;
}

.btn-login-st-01 {
    color: var(--accent-color, #6a00ff);
    font-weight: 700;
    padding: 5px 10px;
    border: 1px solid var(--accent-color, #6a00ff);
    border-radius: 5px;
}

.btn-filled-accent {
    background-color: var(--accent-color, #6a00ff);
    color: white;
    font-weight: 800 !important;
    border: 1px solid var(--accent-color, #6a00ff);
}

.btn-filled-accent:hover {
    background-color: var(--primary-hover, #5a00e0);
    border-color: var(--primary-hover, #5a00e0);
    font-weight: 800 !important;
}

.user-info .logout-link, .user-auth a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.user-info .logout-link:hover, .user-auth a:hover {
    color: var(--accent-color);
}

/* Responsive adjustments for header */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger-icon {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #EAEAEA;
    position: relative;
    transition: background-color 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: #EAEAEA;
    left: 0;
    transition: transform 0.3s ease;
}

.hamburger-icon::before {
    top: -8px;
}

.hamburger-icon::after {
    bottom: -8px;
}

.modern-header.mobile-nav-open .hamburger-icon {
    background-color: transparent;
}

.modern-header.mobile-nav-open .hamburger-icon::before {
    transform: translateY(8px) rotate(45deg);
}

.modern-header.mobile-nav-open .hamburger-icon::after {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
    }

    .header-left-section {
        flex-grow: 1;
    }

    .mobile-nav-toggle {
        display: block;
    }

    .nav-wrapper {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #121217;
        padding: 20px;
        order: 3; /* Ensure it's below logo and toggle */
    }

    .modern-header.mobile-nav-open .nav-wrapper {
        display: flex;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 20px;
        align-items: center;
        width: 100%;
    }

    .user-info, .user-auth {
        flex-direction: column;
        gap: 20px;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
    }
}

/* --- Footer --- */
.site-footer {
    background-color: var(--primary-container-bg);
    color: var(--text-color);
    padding: 50px 0;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-about, .footer-links, .footer-social {
    flex: 1;
    min-width: 260px;
}

.footer-desc {
    margin-top:10px;
    margin-bottom:10px;
    line-height: 1;
}

.footer-about h3 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.footer-about h3 .gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.footer-about p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #aaa;
}

.footer-links h4, .footer-social h4 {
    font-size: 1.2rem;
    color: var(--heading-color);
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: var(--accent-color);
}

.social-icons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #aaa;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--heading-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    font-size: 0.9rem;
    color: #888;
    margin: 0;
}

@media (max-width: 768px) {
    .main-container {
        padding: 20px 15px;
    }
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    .social-icons {
        justify-content: center;
    }
}

/* --- Modern Theme Styles --- */
.gradient-text {
    background: linear-gradient(90deg, #8E2DE2, #4A00E0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.modern-header {
    background-color: #0B0B0F;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.modern-header .header-container {
    max-width: 1200px;
    padding: 0 2rem;
}

.modern-header .main-nav ul li a {
    color: #EAEAEA;
    font-weight: 600;
    font-size: 1rem;
}

.modern-header .main-nav ul li a:hover {
    color: #8E2DE2;
    text-decoration: none;
}

.modern-header .user-info .image-count-display {
    background-color: rgba(255, 255, 255, 0.1);
    color: #EAEAEA;
}

.modern-header .user-info .count {
    color: #EAEAEA;
}

.modern-header .user-auth a, .modern-header .user-info .dropdown-toggle {
    color: #EAEAEA;
    font-weight: 600;
    border: 1px solid #8E2DE2;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.modern-header .user-auth a:hover, .modern-header .user-info .dropdown-toggle:hover {
    background-color: #8E2DE2;
    color: white;
    text-decoration: none;
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #1A1A20;
    border-radius: 8px;
    padding: 0.5rem;
    padding-top: 0.75rem; /* Added padding-top for easier hover */
    margin-top: 0.5rem;
    min-width: 120px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: #EAEAEA;
    text-decoration: none;
}

.dropdown-menu a:hover {
    background-color: #8E2DE2;
    color: white;
}

.modern-footer {
    background-color: #0B0B0F;
    color: #A0A0A0;
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom:110px;
}

.modern-footer .footer-container {
    max-width: 1200px;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modern-footer .footer-left h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.modern-footer .footer-left p {
    font-size: 0.9rem;
}

.modern-footer .footer-right p.sub {
    font-size: 0.8rem;
}

.modern-footer .footer-right {
    text-align: right;
}

.modern-footer .footer-links a {
    color: #A0A0A0;
    margin-left: 1.5rem;
    text-decoration: none;
    font-size: 0.9rem;
}

.modern-footer .footer-links a:hover {
    color: #EAEAEA;
    text-decoration: underline;
}

.modern-footer .footer-social {
    margin-top: 1rem;
    font-size: 0.8rem;
}

.ad-pc-section {
    position:fixed;
    bottom:0;
    width:100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    z-index: 1000;
}

.ad-pc-section .btn-ad-close {
    position: absolute;
    top: -25px;
    right: calc(50% - 364px - 30px);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.ad-pc-section .btn-ad-close img {
    width: 20px;
    height: 20px;
}

/* 자체 광고 */
.tittlelab-ad-section {
    display:flex;
    align-items: center;
    justify-content: center;
}
.tittlelab-ad-section a {
    line-height: 0;
}
 #tittlelab-ad-link {
    position: relative;
    display: block;
    width: fit-content;
    height: 90px; /* Default height for PC */
    margin: 0 auto;
}
@media (max-width: 992px) {
    #tittlelab-ad-link {
        height: 100px; /* Height for mobile */
    }
}
.tittlelab-ad-image {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: opacity 0.5s ease-in-out;
}