/* General Body Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;
}

/* Centered Container */
.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
.header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    color: #000;
}

.nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
}

.nav a {
    margin: 0 30px;
    text-decoration: none;
    color: #555;
    font-size: 16px;
    white-space: nowrap;
    vertical-align: middle;
    transition: color 0.2s;
}

.nav a:hover {
    color: #007aff;
}

.header-login {
    display: flex;
    align-items: center;
}

.login-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    transition: all 0.2s ease;
    text-decoration: none;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

.login-icon:hover {
    background-color: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.login-icon svg {
    width: 20px;
    height: 20px;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 100px 0;
}

.hero h1 {
    font-size: 56px;
    font-weight: 800;
    margin: 0 0 10px;
    color: #000;
}

.hero p {
    font-size: 18px;
    color: #555;
    max-width: 600px;
    margin: 0 auto;
}

/* Features Section */
.features {
    display: flex;
    justify-content: space-between;
    text-align: center;
    padding: 50px 0;
    gap: 30px;
}

.feature-card {
    flex: 1;
    padding: 30px;
    border: 1px solid #eaeaea;
    border-radius: 10px;
}

.feature-card h3 {
    font-size: 22px;
    margin-top: 0;
    color: #000;
}

/* Feature Card Link Wrapper */
.feature-card-link {
    text-decoration: none;
    color: inherit;
    display: block; /* Make the link a block-level element */
    transition: transform 0.2s ease-in-out;
}

.feature-card-link:hover {
    transform: translateY(-5px); /* Add a subtle lift on hover */
}

/* Call to Action Section */
.cta-section {
    text-align: center;
    padding: 80px 0;
    background-color: #f9f9f9;
    border-radius: 10px;
    margin: 40px 0;
}

.cta-section h2 {
    font-size: 32px;
    margin-top: 0;
    color: #000;
}

.cta-button {
    display: inline-block;
    background-color: #007aff; /* Blue accent color */
    color: #fff;
    padding: 15px 35px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    margin-top: 20px;
    transition: background-color 0.2s;
}

.cta-button:hover {
    background-color: #0056b3;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header {
        padding: 20px 0;
        flex-direction: column;
        gap: 15px;
    }
    
    .nav {
        position: static;
        transform: none;
        margin-top: 15px;
    }
    
    .nav a {
        margin: 0 15px;
        font-size: 14px;
    }
    
    .hero h1 {
        font-size: 48px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .features {
        flex-direction: column;
        gap: 20px;
    }
    
    .feature-card {
        padding: 25px;
    }
    
    .profile-trigger {
        padding: 8px 12px;
    }
    
    .profile-name {
        display: none; /* 모바일에서는 이름 숨김 */
    }
    
    .dropdown-menu {
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .nav a {
        margin: 0 10px;
        font-size: 13px;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .login-icon {
        width: 36px;
        height: 36px;
    }
    
    .login-icon svg {
        width: 18px;
        height: 18px;
    }
}

/* Profile Menu Styles */
.profile-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.profile-trigger {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.2s ease;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    text-decoration: none;
}

.profile-trigger:hover {
    background-color: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.profile-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.profile-name {
    margin-left: 8px;
    font-weight: 500;
    color: #495057;
    font-size: 14px;
    white-space: nowrap;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.95);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 16px;
    width: 12px;
    height: 12px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-bottom: none;
    border-right: none;
    transform: rotate(45deg);
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: #495057;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
    position: relative;
}

.dropdown-item:first-child {
    margin-top: 8px;
}

.dropdown-item:last-child {
    margin-bottom: 8px;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #007aff;
}

.dropdown-item.logout {
    color: #dc3545;
    border-top: 1px solid #f1f3f4;
    margin-top: 4px;
    padding-top: 16px;
}

.dropdown-item.logout:hover {
    background-color: #fdf2f2;
    color: #dc3545;
}

.dropdown-item svg {
    margin-right: 12px;
    opacity: 0.8;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.dropdown-item:hover svg {
    opacity: 1;
}

/* --- Drag and Drop Styles --- */
.drop-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    color: #aaa;
    cursor: pointer;
    transition: border-color 0.3s, background-color 0.3s;
}
.drop-zone.drag-over {
    border-color: #007aff;
    background-color: #f0f8ff;
}
.drop-zone p {
    margin: 0;
}
.preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}
.preview-item {
    position: relative;
    width: 150px;
    height: 150px;
}
.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ddd;
}
.preview-label {
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(0, 122, 255, 0.8);
    color: white;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: bold;
    border-top-left-radius: 8px;
    border-bottom-right-radius: 8px;
}
/* --- 현재 썸네일 표시 영역 (수정 페이지) --- */
.current-thumbnail {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}
.current-thumbnail p {
    margin: 0 0 10px 0;
    font-weight: 500;
    color: #333;
}
.current-thumbnail img {
    max-width: 200px;
    border-radius: 8px;
    display: block;
    margin-bottom: 10px;
}
.current-thumbnail .description {
    font-size: 0.9em;
    color: #666;
    margin: 0;
}

/* Brand Management Styles */
.brand-info {
    line-height: 1.4;
}

.brand-info strong {
    font-weight: 600;
    color: #333;
}

.brand-info small {
    color: #666;
    font-size: 0.85em;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.inactive {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.link {
    color: #007cba;
    text-decoration: none;
    font-size: 0.9em;
}

.link:hover {
    text-decoration: underline;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state p {
    margin: 0;
    font-size: 14px;
}

/* Ad Layout Styles - Floating Sidebars */
.ad-sidebar {
    position: fixed;
    top: 120px; /* Adjust based on header height */
    width: 160px;
    z-index: 999;
    /* Use visibility to prevent AdSense availableWidth=0 error */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.ad-sidebar.left {
    left: 0;
}

.ad-sidebar.right {
    right: 0;
}

.footer-ad-container {
    text-align: center;
    margin-top: 40px;
}

/* Show floating ads only on wide screens, providing more space */
@media (min-width: 1480px) {
    .ad-sidebar {
        visibility: visible;
        opacity: 1;
    }
}

/* Footer Styles */
.footer {
    background-color: #ffffff;
    border-top: 1px solid #e9ecef;
    margin-top: 60px;
}

.footer-content {
    max-width: 1080px;
    margin: 0 auto;
    padding: 48px 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 48px;
    margin-bottom: 32px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-brand h2 {
    font-size: 32px;
    font-weight: 800;
    color: #000;
    margin: 0;
}

.footer-brand p {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.footer-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin: 0 0 16px 0;
    letter-spacing: 0.5px;
}

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

.footer-section li {
    margin-bottom: 12px;
}

.footer-section a {
    font-size: 14px;
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: #000;
}

.footer-bottom {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.footer-bottom p {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
}

/* Footer Responsive Design */
@media (max-width: 768px) {
    .footer-content {
        padding: 32px 15px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .footer-brand h2 {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .footer-links {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-brand h2 {
        font-size: 24px;
    }
}
