* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: #2d3748;
    margin-bottom: 30px;
    position: relative;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #4c51bf 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 로그인 상태 표시 */
.login-status {
    position: absolute;
    top: 10px;
    right: 0;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.login-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.login-status.not-logged-in {
    background: #fee;
    color: #dc3545;
    border: 1px solid #fcc;
}

.login-status.not-logged-in::before {
    background: #dc3545;
}

.login-status.session-active {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.login-status.session-active::before {
    background: #ffc107;
}

.login-status.logged-in {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.login-status.logged-in::before {
    background: #28a745;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07), 0 10px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    border: 1px solid rgba(0,0,0,0.05);
}

.card h2 {
    color: #333;
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.card h3 {
    color: #555;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #4c51bf;
    box-shadow: 0 0 0 3px rgba(76, 81, 191, 0.1);
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #4c51bf, #667eea);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(76, 81, 191, 0.3);
    background: linear-gradient(135deg, #434190, #5a67d8);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.progress-bar-container {
    background: #f0f0f0;
    border-radius: 10px;
    height: 30px;
    position: relative;
    margin-bottom: 25px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #4c51bf, #667eea);
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #333;
    font-weight: 600;
}

.status-info {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.status-item {
    display: flex;
    margin-bottom: 12px;
}

.status-item:last-child {
    margin-bottom: 0;
}

.status-label {
    font-weight: 600;
    color: #666;
    min-width: 100px;
    margin-right: 15px;
}

.status-value {
    color: #333;
    flex: 1;
}

.alert {
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.alert h3 {
    margin-bottom: 10px;
}

.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}


.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.hidden {
    display: none !important;
}

/* 서비스 선택 그리드 */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 25px;
    margin-bottom: 20px;
}

.service-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #2d3748;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
}

.service-card.selected {
    transform: scale(1.02);
    border-color: #4c51bf;
    background: linear-gradient(135deg, rgba(76, 81, 191, 0.05) 0%, rgba(102, 126, 234, 0.05) 100%);
    box-shadow: 0 0 0 3px rgba(76, 81, 191, 0.1), 0 10px 25px rgba(0, 0, 0, 0.1);
}

.service-card h3 {
    color: #2d3748;
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.service-card p {
    color: #718096;
    font-size: 0.9rem;
    margin: 0;
}

/* 추가 입력 필드 컨테이너 스타일 */
.additional-fields-container {
    margin-top: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s ease-in-out;
}

.additional-fields-container:not(.hidden) {
    max-height: 500px;
    opacity: 1;
    margin-top: 20px;
}

.additional-fields-box {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.additional-fields-box h3 {
    color: #2d3748;
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.additional-fields-box .form-group {
    margin-bottom: 15px;
}

.additional-fields-box .form-group:last-child {
    margin-bottom: 0;
}

.additional-fields-box label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.additional-fields-box input[type="text"],
.additional-fields-box input[type="file"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.additional-fields-box input[type="text"]:focus {
    outline: none;
    border-color: #4c51bf;
    box-shadow: 0 0 0 3px rgba(76, 81, 191, 0.1);
}

.additional-fields-box .file-info {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}


.info-text {
    color: #666;
    font-size: 0.95rem;
    margin: -10px 0 20px 0;
    text-align: center;
}

#back-btn {
    margin-bottom: 20px;
}


/* 로딩 애니메이션 */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* 선택된 서비스 정보 및 실행 버튼 */
.selected-info {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e2e8f0;
    text-align: center;
}

.selected-display {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.selected-label {
    color: #718096;
    margin-right: 10px;
    font-weight: 500;
}

.selected-value {
    color: #2d3748;
    font-weight: 700;
    font-size: 1.2rem;
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 반응형 디자인 */
@media (max-width: 600px) {
    header h1 {
        font-size: 2rem;
    }
    
    .login-status {
        position: static;
        margin-top: 15px;
        display: inline-flex;
    }
    
    .card {
        padding: 20px;
    }
    
    .status-item {
        flex-direction: column;
    }
    
    .status-label {
        margin-bottom: 5px;
    }
    
    .selected-display {
        flex-direction: column;
    }
    
    .selected-label {
        margin-right: 0;
        margin-bottom: 5px;
    }
}
/* 이미지 갤러리 */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.image-item {
    position: relative;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.image-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.image-item img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: #f5f5f5;
}

.image-item-info {
    padding: 10px;
    background: white;
    border-top: 1px solid #eee;
}

.image-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-item-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.image-item-actions button {
    flex: 1;
    padding: 5px 10px;
    font-size: 0.85rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-view {
    background: #667eea;
    color: white;
}

.btn-view:hover {
    background: #5a67d8;
}

.btn-download {
    background: #48bb78;
    color: white;
}

.btn-download:hover {
    background: #38a169;
}

.gallery-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

/* 이미지 모달 */
.modal {
    display: block;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

.modal.hidden {
    display: none;
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
}

.modal-close:hover,
.modal-close:focus {
    color: #bbb;
}

#modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
}

.modal-controls {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 8px;
}

.modal-controls button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.modal-controls button:hover {
    background: rgba(255, 255, 255, 0.3);
}

#image-counter {
    color: white;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
}

/* 이미지 갤러리 반응형 */
@media (max-width: 768px) {
    .image-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .image-item img {
        height: 150px;
    }
}
