/* === Common styles shared across pages === */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f0f2f5;
    color: #1c1e21;
    background-image: url('../images/ct_background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Main Content --- */
#main-content {
    max-width: 800px;
    margin: 0 auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.header h1 {
    margin: 0;
    line-height: 44px;
    color: white;
}

.header-buttons {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    position: relative;
}

h1,
h2 {
    color: #000;
}

/* General Input and Button Styles */
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #dddfe2;
    border-radius: 6px;
    box-sizing: border-box;
}

button {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    background-color: #007bff;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

#view-gallery-btn {
    display: inline-block;
    width: auto;
    padding: 12px 20px;
    font-size: 14px;
    margin-right: 4px;
    height: 44px;
    white-space: nowrap;
    background-image: url('../images/ct_button3.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    border: none;
}

#header-login-btn {
    display: inline-block;
    width: auto;
    padding: 12px 20px;
    font-size: 14px;
    margin-right: 4px;
    height: 44px;
    white-space: nowrap;
    background-image: url('../images/ct_button3.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    border: none;
}

#purchase-btn {
    display: inline-block;
    width: auto;
    padding: 12px 20px;
    font-size: 14px;
    margin-right: 4px;
    height: 44px;
    white-space: nowrap;
    background-image: url('../images/ct_button3.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    border: none;
}

#menu-btn {
    width: auto;
    padding: 12px 20px;
    font-size: 14px;
    margin: 0;
    height: 44px;
    background-color: #6c757d;
}

#menu-btn:hover {
    background-color: #5a6268;
}

.menu-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 48px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    z-index: 1000;
}

.menu-item {
    width: 100%;
    text-align: left;
    padding: 10px 15px;
    border: none;
    background: white;
    cursor: pointer;
    color: #333;
    font-size: 14px;
    font-weight: normal;
}

.menu-item:hover {
    background-color: #f0f2f5;
}

.menu-item-top {
    border-radius: 4px 4px 0 0;
}

.menu-item-bottom {
    border-radius: 0 0 4px 4px;
    border-top: 1px solid #eee;
}

.purchase-item {
    background-color: #007bff;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.purchase-item:hover {
    background-color: #0056b3;
}

/* Card layout for sections */
.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    padding: 20px;
}

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

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #606770;
}

.error-message {
    padding: 0.75rem;
    margin-bottom: 1rem;
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 0.25rem;
}

.login-status {
    text-align: center;
    margin-top: 1rem;
    color: #666;
}

/* Header title visibility controlled by JavaScript */
.header-title.hidden {
    display: none;
}

/* Responsive styles */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    #main-content {
        max-width: 100%;
    }
}

/* OS 애니메이션 끔 설정 범용 무시 및 fa-spin 강제 적용 */
@media (prefers-reduced-motion: reduce) {
    .fa-spin {
        animation: fa-spin 2s infinite linear !important;
        transition: none !important;
    }
}

