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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    background: #0f0f0f;
    min-height: 100vh;
    padding-bottom: 50px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(72, 52, 212, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
    z-index: 0;
}

@keyframes gradientShift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(50px, 50px); }
}

/* 네비게이션 바 */
.navbar {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nav-brand {
    font-size: 1.3em;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: white;
    background: rgba(139, 92, 246, 0.2);
}

.nav-user {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    padding: 8px 16px;
    background: rgba(139, 92, 246, 0.3);
    border-radius: 8px;
}

/* 컨테이너 */
.container {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    max-width: 900px;
    width: 100%;
    margin: 40px auto;
    padding: 60px 50px;
    position: relative;
    z-index: 1;
}

h1 {
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    font-size: 3em;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
    font-size: 1.5em;
}

.subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 50px;
    font-size: 1.1em;
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* 섹션 */
.section {
    margin-bottom: 35px;
}

.section-title {
    font-size: 1em;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85em;
}

/* 버튼 그룹 */
.button-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.option-btn {
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95em;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(120, 119, 198, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.option-btn:hover::before {
    opacity: 1;
}

.option-btn:hover {
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-2px);
}

.option-btn.selected {
    background: linear-gradient(135deg, #8b5cf6 0%, #7877c6 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
}

.option-btn.selected::before {
    opacity: 0;
}

/* 버튼 */
.btn {
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #7877c6 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.5);
}

.btn-primary:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    box-shadow: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-error {
    background: #ef4444;
    color: white;
}

.btn-error:hover {
    background: #dc2626;
}

.btn-check {
    padding: 10px 20px;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.5);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-check:hover {
    background: rgba(139, 92, 246, 0.4);
}

.recommend-btn {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7877c6 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 30px;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
    letter-spacing: 0.02em;
}

.recommend-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.5);
}

.recommend-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    box-shadow: none;
}

.refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    border-radius: 14px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    margin-top: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.refresh-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-2px);
}

/* 결과 표시 */
.results {
    margin-top: 50px;
    display: none;
}

.results.show {
    display: block;
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(30px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

.name-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.name-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #8b5cf6 0%, #7877c6 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.name-card:hover {
    transform: translateX(8px);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.2);
}

.name-card:hover::before {
    opacity: 1;
}

.name-title {
    font-size: 2.2em;
    background: linear-gradient(135deg, #ffffff 0%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.name-meaning {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.15em;
    line-height: 1.6;
    margin-bottom: 12px;
    font-weight: 500;
}

.name-detail {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95em;
    line-height: 1.6;
    font-weight: 400;
}

/* 폼 스타일 */
.auth-form, .submit-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 1em;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.form-group small {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 5px;
    font-size: 0.85em;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.input-with-button {
    display: flex;
    gap: 10px;
}

.input-with-button input {
    flex: 1;
}

/* 인증 링크 */
.auth-links {
    margin-top: 30px;
    text-align: center;
}

.auth-links p {
    color: rgba(255, 255, 255, 0.7);
    margin: 10px 0;
}

.auth-links a {
    color: #8b5cf6;
    text-decoration: none;
    font-weight: 600;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* 알림 */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #6ee7b7;
}

.alert-info {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.5);
    color: #93c5fd;
}

/* 정보 박스 */
.info-box {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
}

.info-box h3 {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 10px;
}

.info-box p, .info-box ul {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* 포인트 박스 */
.point-box {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(120, 119, 198, 0.2) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
}

.point-box h2 {
    margin-bottom: 20px;
}

.point-amount {
    font-size: 3em;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 20px 0;
}

.point-box p {
    color: rgba(255, 255, 255, 0.6);
    margin: 15px 0;
}

/* 카드 */
.card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
}

/* 테이블 */
.table-responsive {
    overflow-x: auto;
    margin-top: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: rgba(139, 92, 246, 0.2);
    color: rgba(255, 255, 255, 0.9);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid rgba(139, 92, 246, 0.3);
}

.data-table td {
    padding: 12px;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* 배지 */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.badge-warning {
    background: rgba(251, 191, 36, 0.2);
    color: #fcd34d;
}

.badge-error {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* 통계 그리드 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

.stat-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9em;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2em;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 검토 아이템 */
.review-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.review-header strong {
    font-size: 1.3em;
    color: rgba(255, 255, 255, 0.9);
}

.review-content {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 15px;
}

.review-content p {
    margin: 8px 0;
}

.review-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.review-actions textarea {
    width: 100%;
    margin-bottom: 10px;
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    margin: 5% auto;
    padding: 40px;
    max-width: 500px;
    position: relative;
}

.close {
    color: rgba(255, 255, 255, 0.7);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: white;
}

/* 유틸리티 */
.text-center {
    text-align: center;
}

.text-muted {
    color: rgba(255, 255, 255, 0.5);
}

.text-success {
    color: #6ee7b7;
}

.text-error {
    color: #fca5a5;
}

/* 검색 폼 */
.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 1em;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.page-link {
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.page-link:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
}

.page-link.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #7877c6 100%);
    color: white;
    border-color: transparent;
}

/* 작은 버튼 */
.btn-small {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.3s;
    margin: 2px;
}

.btn-edit {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.5);
}

.btn-edit:hover {
    background: rgba(59, 130, 246, 0.4);
}

.btn-delete {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.5);
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.4);
}

/* 반응형 */
@media (max-width: 768px) {
    .container {
        padding: 40px 30px;
        margin: 20px auto;
    }

    h1 {
        font-size: 2.2em;
    }

    .subtitle {
        font-size: 1em;
    }

    .button-group {
        grid-template-columns: 1fr;
    }

    .name-title {
        font-size: 1.8em;
    }

    .nav-container {
        flex-direction: column;
        gap: 15px;
    }

    .nav-menu {
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .point-amount {
        font-size: 2.5em;
    }

    .modal-content {
        margin: 10% 20px;
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 30px 20px;
    }

    h1 {
        font-size: 1.8em;
    }

    .input-with-button {
        flex-direction: column;
    }

    .btn-check {
        width: 100%;
    }
}
