/* ===========================
   마이페이지 스타일
   =========================== */

.mypage-container {
    min-height: 100vh;
    padding: 100px 20px 60px;
    background: #f8f9fa;
}

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

/* Profile Section */
.profile-section {
    background: linear-gradient(135deg, #2c5f4f 0%, #1a4838 100%);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    color: white;
    display: flex;
    align-items: center;
    gap: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4af37 0%, #f0d98c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 900;
    color: #1a4838;
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.3);
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.profile-email {
    opacity: 0.9;
    margin-bottom: 5px;
}

.profile-date {
    opacity: 0.7;
    font-size: 14px;
}

.profile-stats {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.profile-stat-item {
    text-align: center;
}

.profile-stat-number {
    font-size: 28px;
    font-weight: 900;
    color: #d4af37;
}

.profile-stat-label {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 5px;
}

/* Tabs */
.mypage-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.mypage-tab {
    padding: 15px 30px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    color: #666;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.mypage-tab:hover {
    border-color: #2c5f4f;
    color: #2c5f4f;
}

.mypage-tab.active {
    background: linear-gradient(135deg, #2c5f4f, #1a4838);
    border-color: #2c5f4f;
    color: white;
}

.mypage-tab i {
    margin-right: 8px;
}

/* Content */
.mypage-content {
    display: none;
}

.mypage-content.active {
    display: block;
}

.content-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a4838;
    margin-bottom: 30px;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.result-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.result-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.result-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2c5f4f, #1a4838);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.result-icon i {
    font-size: 24px;
    color: #d4af37;
}

.result-info h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a4838;
    margin-bottom: 5px;
}

.result-date {
    font-size: 13px;
    color: #888;
}

.result-score {
    font-size: 32px;
    font-weight: 900;
    color: #2c5f4f;
    text-align: center;
    margin: 20px 0;
}

.result-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

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

.btn-result {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-view {
    background: linear-gradient(135deg, #2c5f4f, #1a4838);
    color: white;
}

.btn-view:hover {
    background: linear-gradient(135deg, #1a4838, #2c5f4f);
}

.btn-download {
    background: #f0f0f0;
    color: #666;
}

.btn-download:hover {
    background: #e0e0e0;
}

/* Orders */
.orders-container {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.order-item {
    padding: 25px;
    border-bottom: 1px solid #e0e0e0;
}

.order-item:last-child {
    border-bottom: none;
}

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

.order-number {
    font-size: 14px;
    color: #888;
}

.order-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.order-status.completed {
    background: #d4edda;
    color: #155724;
}

.order-status.pending {
    background: #fff3cd;
    color: #856404;
}

.order-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-info h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a4838;
    margin-bottom: 8px;
}

.order-date {
    font-size: 14px;
    color: #888;
}

.order-price {
    font-size: 24px;
    font-weight: 900;
    color: #2c5f4f;
}

.order-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

/* Refund */
.refund-info-box {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
}

.refund-info-box i {
    font-size: 28px;
    color: #ffc107;
}

.refund-info-box h3 {
    font-size: 18px;
    font-weight: 700;
    color: #856404;
    margin-bottom: 10px;
}

.refund-info-box p {
    font-size: 14px;
    color: #856404;
    margin: 5px 0;
}

.refund-info-box a {
    color: #2c5f4f;
    text-decoration: underline;
}

.refund-list {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.refund-item {
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 15px;
}

.refund-item:last-child {
    margin-bottom: 0;
}

.refund-item.can-refund {
    border-color: #28a745;
    background: #f0f9f4;
}

.refund-item.cannot-refund {
    border-color: #dc3545;
    background: #fdf0f0;
    opacity: 0.7;
}

.refund-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.refund-badge {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.refund-badge.success {
    background: #d4edda;
    color: #155724;
}

.refund-badge.danger {
    background: #f8d7da;
    color: #721c24;
}

.refund-history {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.refund-history h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a4838;
    margin-bottom: 20px;
}

.refund-history-item {
    padding: 20px;
    border-left: 4px solid #d4af37;
    background: #f8f9fa;
    margin-bottom: 15px;
    border-radius: 8px;
}

.refund-history-status {
    font-weight: 600;
    margin-bottom: 8px;
}

.refund-history-status.approved {
    color: #28a745;
}

.refund-history-status.rejected {
    color: #dc3545;
}

.refund-history-status.pending {
    color: #ffc107;
}

/* Settings */
.settings-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.settings-section h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a4838;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

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

.form-group label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1a4838;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #2c5f4f;
}

.setting-item {
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.setting-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
}

.setting-label span {
    font-size: 15px;
    color: #555;
}

.danger-zone {
    border: 2px solid #dc3545;
}

.danger-zone h3 {
    color: #dc3545;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #2c5f4f, #1a4838);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1a4838, #2c5f4f);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    font-size: 22px;
    color: #1a4838;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #888;
    cursor: pointer;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding: 20px 30px;
    border-top: 1px solid #e0e0e0;
}

.refund-item-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.required {
    color: #dc3545;
}

.refund-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.refund-warning i {
    color: #ffc107;
    font-size: 20px;
}

.refund-warning p {
    font-size: 14px;
    color: #856404;
    margin: 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.empty-state i {
    font-size: 60px;
    color: #d4af37;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 20px;
    color: #555;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .profile-section {
        flex-direction: column;
        text-align: center;
    }

    .profile-stats {
        justify-content: center;
    }

    .mypage-tabs {
        flex-direction: column;
    }

    .mypage-tab {
        width: 100%;
    }

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

    .order-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .order-actions {
        flex-direction: column;
    }

    .modal-content {
        width: 95%;
    }

    .modal-body {
        padding: 20px;
    }
}
