/* Bauhaus 테일윈드 기반 색상 변수 */
:root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    
    --primary: 0 70% 55%; /* Bauhaus red */
    --primary-foreground: 0 0% 100%;
    --primary-muted: 211 100% 50%; /* blue for gradient */
    
    --secondary: 48 100% 62%; /* Bauhaus yellow */
    --secondary-foreground: 0 0% 10%;
    
    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;
    
    --border: 214.3 31.8% 91.4%;
    --radius: 0.5rem;
    
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 100%;
    
    --ring: 222.2 84% 4.9%;
    --input: 214.3 31.8% 91.4%;
    --accent: 210 40% 96.1%;
    --accent-foreground: 222.2 84% 4.9%;
}

/* HSL 색상을 hex로 변환 */
:root {
    --primary-color: hsl(var(--primary));
    --primary-rgb: #dc3b3b; /* Bauhaus red */
    --primary-muted-color: hsl(var(--primary-muted));
    --secondary-color: hsl(var(--secondary)); 
    --secondary-rgb: #ffc93c; /* Bauhaus yellow */
    --secondary-dark: #1e293b; /* secondary-dark */
    --background-rgb: #ffffff;
    --foreground-rgb: #0f172a;
    --muted-rgb: #f1f5f9;
}

/* 메인 컨테이너 */
.entry-container {
    min-height: 100vh;
    background-color: #f8f9fa;
    padding-top: 80px;
    padding-bottom: 40px;
}

.entry-content {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 16px;
}

/* 페이지 헤더 */
.entry-header {
    text-align: center;
    margin-bottom: 32px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.entry-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 16px;
    color: #333;
}

.entry-guidelines {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #666;
    margin-bottom: 16px;
}

.entry-notice {
    margin-top: 16px;
    padding: 16px;
    background: rgba(220, 59, 59, 0.1);
    border-radius: 8px;
}

.entry-notice p {
    font-weight: 600;
    color: var(--primary-rgb);
    margin: 0;
}

/* 카드 스타일 */
.card {
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 32px;
}

.card-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 24px;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
    margin: 0;
    color: #1f2937;
}

.card-content {
    padding: 24px;
    padding-top: 0;
}

/* 폼 요소들 */
.form-space-y-6 {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-space-y-4 {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-space-y-2 {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-grid {
    display: grid;
    gap: 24px;
}

.form-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.form-grid-1 {
    grid-template-columns: 1fr;
}

/* 라벨 */
.label {
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    color: #374151;
    margin-bottom: 8px;
    display: block;
}

.label-required::after {
    content: " *";
    color: #dc2626;
}

/* 인풋 */
.input {
    display: flex;
    height: 40px;
    width: 100%;
    border-radius: 6px;
    border: 1px solid hsl(var(--border));
    background: white;
    padding: 8px 12px;
    font-size: 14px;
    transition: all 0.2s;
}

.input:focus {
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.input:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.input::placeholder {
    color: hsl(var(--muted-foreground));
}

/* 체크박스 그룹 */
.checkbox-group {
    display: flex;
    gap: 24px;
    margin-top: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-item .checkbox {
    margin-top: 0;
}

.checkbox-item .checkbox-label {
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

/* 부문별 폼 섹션 */
.category-form-section {
    margin-bottom: 32px;
}

.category-form-section .card {
    margin-bottom: 24px;
}

.category-form-section .card:last-child {
    margin-bottom: 0;
}

/* 텍스트에어리어 */
.textarea {
    display: flex;
    min-height: 80px;
    width: 100%;
    border-radius: 6px;
    border: 1px solid hsl(var(--border));
    background: white;
    padding: 12px;
    font-size: 14px;
    transition: all 0.2s;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

.textarea:focus {
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.textarea::placeholder {
    color: hsl(var(--muted-foreground));
}

/* 버튼 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.btn:disabled {
    pointer-events: none;
    opacity: 0.5;
}

.btn-default {
    background: hsl(var(--primary));
    color: white;
    height: 40px;
    padding: 8px 16px;
}

.btn-default:hover {
    background: hsl(var(--primary) / 0.9);
}

.btn-outline {
    border: 1px solid hsl(var(--border));
    background: white;
    color: hsl(var(--foreground));
    height: 40px;
    padding: 8px 16px;
}

.btn-outline:hover {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.btn-lg {
    height: 44px;
    padding: 12px 32px;
    border-radius: 6px;
    font-size: 18px;
}

.btn-sm {
    height: 36px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
}

/* 체크박스 */
.checkbox {
    height: 16px;
    width: 16px;
    border-radius: 2px;
    border: 1px solid var(--primary-rgb);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-top: 3px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox:checked {
    background: var(--primary-rgb);
    color: white;
}

.checkbox:checked::after {
    content: '✓';
    font-size: 12px;
    font-weight: bold;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.checkbox-label {
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
    line-height: 1.4;
}

/* 라디오 그룹 */
.radio-group {
    display: flex;
    gap: 24px;
    margin-top: 8px;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.radio-input {
    width: 16px;
    height: 16px;
    border: 1px solid var(--primary-rgb);
    border-radius: 50%;
    background: white;
    position: relative;
    cursor: pointer;
}

.radio-input:checked::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-rgb);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.radio-label {
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

/* 팀 멤버 섹션 */
.team-member {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
}

.team-member-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.team-member-title {
    font-weight: 600;
    color: #374151;
    margin: 0;
}

/* 파일 업로드 */
.file-upload-area {
    margin-top: 8px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 32px;
    text-align: center;
    background: #f9fafb;
    transition: border-color 0.2s;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: var(--primary-rgb);
}

.file-upload-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    color: #9ca3af;
}

.file-upload-text {
    color: #6b7280;
    margin-bottom: 8px;
}

.file-upload-size {
    font-size: 14px;
    color: #9ca3af;
    margin-bottom: 16px;
}

.file-selected {
    margin-top: 8px;
    font-size: 14px;
    color: #059669;
    padding: 12px;
    background: #f0fdf4;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
}

.file-selected .file-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-selected .file-details {
    flex: 1;
}

.file-selected .file-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.file-selected .file-size {
    font-size: 13px;
    color: #374151;
}

.file-selected .file-note {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

.file-selected .file-warning {
    color: #dc2626;
}

/* 링크 섹션 */
.link-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.link-input {
    flex: 1;
}

.link-notes {
    margin-top: 8px;
    font-size: 14px;
    color: #6b7280;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* 동의사항 */
.agreement-section {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.agreement-item {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.agreement-content {
    margin-left: 28px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
}

.agreement-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #d1d5db;
    font-size: 12px;
    margin: 12px 0;
}

.agreement-table th,
.agreement-table td {
    border: 1px solid #d1d5db;
    padding: 8px;
    text-align: left;
}

.agreement-table th {
    background: #f3f4f6;
    font-weight: 600;
}

.warning-text {
    color: #dc2626;
    font-weight: 500;
}

/* 도움말 텍스트 */
.help-text {
    font-size: 14px;
    color: #6b7280;
    margin-top: 4px;
}

.help-text.success {
    color: #059669;
}

.help-text.error {
    color: #dc2626;
}

/* 제출 섹션 */
.submit-section {
    text-align: center;
    margin-top: 32px;
}

.submit-warning {
    font-size: 14px;
    color: #dc2626;
    margin-top: 8px;
}

/* 토스트 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 420px;
}

.toast {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.error {
    border-color: #fca5a5;
    background: #fef2f2;
}

.toast.success {
    border-color: #a7f3d0;
    background: #f0fdf4;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.toast-description {
    font-size: 14px;
    color: #6b7280;
}

.toast.error .toast-title {
    color: #dc2626;
}

.toast.success .toast-title {
    color: #059669;
}

.toast-action-btn {
    margin-top: 8px;
    padding: 6px 12px;
    background: var(--primary-rgb);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.toast-action-btn:hover {
    background: #c0392b;
}

/* 애니메이션 */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 반응형 */
@media (max-width: 768px) {
    .entry-title {
        font-size: 2rem;
    }
    
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .entry-content {
        padding: 0 12px;
    }
    
    .card-header,
    .card-content {
        padding: 16px;
    }
    
    .toast-container {
        left: 20px;
        right: 20px;
        max-width: none;
    }

    .checkbox-group {
        flex-direction: row;
        gap: 16px;
        flex-wrap: wrap;
    }
    
    /* 모바일 푸터 스타일 */
    .footer {
        width: 100%;
        overflow: hidden;
    }
    
    .footer-image-section {
        width: 100%;
        overflow: hidden;
    }
    
    .footer-image {
        width: 100%;
        max-width: 1440px;
        height: auto;
    }
    
    .footer-links-container {
        width: 100%;
        max-width: 1440px;
        overflow: hidden;
    }
    
    /* 모바일 푸터 링크 영역 보정 */
    .inus-link {
        top: 27.6%;
        left: 25%;
        width: 17.5%;
        height: 7.5%;
    }
    
    .table-link {
        top: 27.6%;
        left: 46%;
        width: 10.5%;
        height: 7.5%;
    }
    
    .popply-link {
        top: 27.6%;
        left: 60%;
        width: 14.5%;
        height: 7.5%;
    }
}

/* 숨김 */
.hidden {
    display: none;
}

/* 푸터 스타일 */
.footer {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.footer-image-section {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.footer-image {
    width: 100%;
    max-width: 1440px;
    height: auto;
    display: block;
}

.footer-links-container {
    position: relative;
    width: 100%;
    max-width: 1440px;
    overflow: hidden;
}

.footer-link {
    position: absolute;
    display: block;
    cursor: pointer;
    transition: background-color 0.2s ease;
    z-index: 10;
}

/* INUSCOMMUNITY 링크 영역 */
.inus-link {
    top: 27.6%;
    left: 25%;
    width: 17.5%;
    height: 7.5%;
}

/* Table. 링크 영역 */
.table-link {
    top: 27.6%;
    left: 46%;
    width: 10.5%;
    height: 7.5%;
}

/* POPPLY 링크 영역 */
.popply-link {
    top: 27.6%;
    left: 60%;
    width: 14.5%;
    height: 7.5%;
}

/* 아이콘 */
.icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
}

.icon-plus::before {
    content: '+';
    font-weight: bold;
}

.icon-minus::before {
    content: '−';
    font-weight: bold;
}

.icon-upload::before {
    content: '📁';
    font-size: 24px;
}

.icon-check::before {
    content: '✓';
    font-weight: bold;
    color: white;
}