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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

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

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #4f46e5;
    color: white;
}

.btn-primary:hover {
    background-color: #3730a3;
}

.btn-secondary {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background-color: #e2e6ea;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-outline {
    background-color: transparent;
    color: #5a4fcf;
    border: 1px solid #5a4fcf;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    transform: translateY(-1px);
}

.btn-apply {
    padding: 18px 40px;
    font-size: 1.3rem;
    font-weight: 600;
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 50%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
    transition: all 0.3s ease;
}

.btn-apply:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(245, 158, 11, 0.6);
    background: linear-gradient(135deg, #f97316 0%, #dc2626 50%, #b91c1c 100%);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-image {
    margin: 2rem 0;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.hero-logo {
    max-width: 400px !important;
    height: auto;
    border-radius: 15px !important;
    box-shadow: 0 15px 40px rgba(79, 70, 229, 0.2) !important;
    border: 3px solid rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.1));
}

.hero-logo:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 50px rgba(79, 70, 229, 0.3) !important;
}

/* Project Description */
.project-description {
    padding: 4rem 0;
}

.project-description h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2d3748;
}

.description-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.description-item {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.description-item:hover {
    transform: translateY(-5px);
}

.description-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #4f46e5;
}

.apply-section {
    text-align: center;
    margin-top: 2.5rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
}

.close:hover {
    color: black;
}

/* 관리자 로그인 모달 */
#adminLoginModal .modal-content {
    max-width: 400px;
    text-align: center;
    animation: fadeInUp 0.3s ease;
}

#adminLoginModal h2 {
    color: #4f46e5;
    margin-bottom: 0.5rem;
}

#adminPassword {
    text-align: center;
    font-size: 1.1rem;
    padding: 15px;
    margin-bottom: 1rem;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

#adminPassword:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

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

/* Forms */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group.half {
    flex: 1;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #2d3748;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #4f46e5;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* 졸업 예정 시기 선택 */
.graduation-select {
    display: flex;
    gap: 0.5rem;
}

.graduation-select select {
    flex: 1;
}

/* 전공 선택 */
#majorCustom {
    border-color: #4f46e5;
    background-color: #f8fafc;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
    transform: translateY(-5px);
}

#majorCustom:focus {
    background-color: white;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Select 스타일링 */
select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* 알림 메시지 */
.alert {
    padding: 12px 16px;
    margin-bottom: 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-color: #10b981;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: #ef4444;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border-color: #f59e0b;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border-color: #3b82f6;
}

/* 전역 알림 스타일 */
.global-alert {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: slideDownFadeIn 0.3s ease;
}

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

.global-alert-warning {
    background-color: #f59e0b;
    color: white;
}

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

@keyframes slideDownFadeIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 로딩 스피너 */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .nav-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .btn-apply {
        padding: 15px 30px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-group.half {
        margin-bottom: 1rem;
    }
    
    .graduation-select {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-content {
        width: 95%;
        padding: 1.5rem;
        margin: 2% auto;
    }
    
    .nav-buttons {
        flex-direction: column;
        gap: 5px;
        width: 100%;
    }
    
    .btn-apply {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

/* Profile Page Styles */
.profile-section {
    padding: 4rem 0;
    min-height: calc(100vh - 80px);
    background-color: #f8fafc;
}

.profile-section h1 {
    text-align: center;
    font-size: 2.5rem;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.profile-section .section-subtitle {
    text-align: center;
    color: #718096;
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.profile-form-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.form-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.form-actions .btn {
    min-width: 120px;
    padding: 12px 24px;
}

.user-info {
    color: white;
    font-weight: 500;
    margin-right: 1rem;
}

/* Profile form specific styles */
.profile-form-container .form-group input[readonly] {
    background-color: #f7fafc !important;
    color: #4a5568;
    cursor: not-allowed;
    border-color: #e2e8f0;
}

.profile-form-container .form-group input[readonly]:focus {
    border-color: #e2e8f0;
    box-shadow: none;
}

@media (max-width: 768px) {
    .profile-form-container {
        margin: 0 1rem;
        padding: 2rem;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .form-actions .btn {
        width: 100%;
        max-width: 200px;
    }
}

/* ===== 연구 분야 카테고리 섹션 ===== */
.research-categories {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.research-categories .section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: #1a202c;
}

.research-categories .section-subtitle {
    font-size: 1.2rem;
    text-align: center;
    color: #64748b;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.category-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    transition: height 0.3s ease;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.category-card:hover::before {
    height: 6px;
}

.computational-chemistry::before {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

.drug-design::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

.gene-engineering::before {
    background: linear-gradient(90deg, #06b6d4, #0891b2);
}

.drug-delivery::before {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.category-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1a202c;
    line-height: 1.3;
}

.category-card p {
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

.features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.features li {
    color: #475569;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.category-card .btn-outline {
    background: transparent;
    color: #4f46e5;
    border: 2px solid #4f46e5;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.95rem;
    width: 100%;
    margin-top: auto;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.category-card .btn-outline:hover {
    color: white;
    transform: translateY(-2px);
}

.computational-chemistry .btn-outline {
    color: #3b82f6;
    border-color: #3b82f6;
}

.computational-chemistry .btn-outline:hover {
    background: #3b82f6;
}

.drug-design .btn-outline {
    color: #10b981;
    border-color: #10b981;
}

.drug-design .btn-outline:hover {
    background: #10b981;
}

.gene-engineering .btn-outline {
    color: #06b6d4;
    border-color: #06b6d4;
}

.gene-engineering .btn-outline:hover {
    background: #06b6d4;
}

.drug-delivery .btn-outline {
    color: #f59e0b;
    border-color: #f59e0b;
}

.drug-delivery .btn-outline:hover {
    background: #f59e0b;
}

@media (max-width: 768px) {
    .research-categories {
        padding: 60px 0;
    }
    
    .research-categories .section-title {
        font-size: 2rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .category-card {
        padding: 1.5rem;
    }
}
