/* KU-MBA 강의평가 플랫폼 스타일 */

/* Korean Typography Optimization */
* {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    line-height: 1.7; /* Korean text optimized line height */
    letter-spacing: -0.02em;
    word-break: keep-all; /* Prevent Korean word breaks */
    position: relative;
    overflow-x: hidden;
}

/* Mobile-First Base Styles */
@media (max-width: 576px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .hero-section {
        padding: 1.5rem 0.5rem !important;
    }
    
    .hero-section h1 {
        font-size: 1.5rem !important;
    }
    
    .hero-section .lead {
        font-size: 0.9rem !important;
    }
}

/* 3D Background Objects */
.background-3d {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    perspective: 1000px;
}

/* Floating 3D Cubes */
.floating-cube {
    position: absolute;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.1), rgba(220, 20, 60, 0.05));
    border: 1px solid rgba(220, 20, 60, 0.1);
    transform-style: preserve-3d;
    animation: float-rotate 20s infinite linear;
}

/* Hide 3D elements on mobile for performance */
@media (max-width: 768px) {
    .floating-cube,
    .floating-pyramid,
    .floating-sphere {
        display: none;
    }
    
    .background-3d {
        display: none;
    }
}

.floating-cube::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(220, 20, 60, 0.08), transparent);
    transform: rotateY(90deg) translateZ(40px);
}

.floating-cube::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(220, 20, 60, 0.06), transparent);
    transform: rotateX(90deg) translateZ(40px);
}

.cube-1 {
    top: 10%;
    left: 85%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.cube-2 {
    top: 60%;
    left: 5%;
    animation-delay: -8s;
    animation-duration: 30s;
}

.cube-3 {
    top: 30%;
    left: 90%;
    animation-delay: -15s;
    animation-duration: 35s;
}

/* Floating 3D Pyramids */
.floating-pyramid {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 60px solid rgba(107, 114, 128, 0.08);
    transform-style: preserve-3d;
    animation: float-spin 18s infinite linear;
}

.pyramid-1 {
    top: 20%;
    left: 10%;
    animation-delay: -5s;
}

.pyramid-2 {
    top: 70%;
    left: 80%;
    animation-delay: -12s;
}

/* Floating 3D Spheres */
.floating-sphere {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(2, 132, 199, 0.1), rgba(2, 132, 199, 0.05));
    border: 1px solid rgba(2, 132, 199, 0.1);
    animation: float-bounce 15s infinite ease-in-out;
}

.sphere-1 {
    top: 15%;
    left: 15%;
    animation-delay: -3s;
}

.sphere-2 {
    top: 50%;
    left: 92%;
    animation-delay: -10s;
}

/* 3D Animation Keyframes */
@keyframes float-rotate {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg) translateY(0px);
    }
    25% {
        transform: rotateX(90deg) rotateY(90deg) rotateZ(45deg) translateY(-20px);
    }
    50% {
        transform: rotateX(180deg) rotateY(180deg) rotateZ(90deg) translateY(0px);
    }
    75% {
        transform: rotateX(270deg) rotateY(270deg) rotateZ(135deg) translateY(20px);
    }
    100% {
        transform: rotateX(360deg) rotateY(360deg) rotateZ(180deg) translateY(0px);
    }
}

@keyframes float-spin {
    0% {
        transform: rotateY(0deg) translateX(0px) scale(1);
    }
    33% {
        transform: rotateY(120deg) translateX(15px) scale(1.1);
    }
    66% {
        transform: rotateY(240deg) translateX(-15px) scale(0.9);
    }
    100% {
        transform: rotateY(360deg) translateX(0px) scale(1);
    }
}

@keyframes float-bounce {
    0%, 100% {
        transform: translateY(0px) scale(1);
        opacity: 0.7;
    }
    25% {
        transform: translateY(-30px) scale(1.05);
        opacity: 0.8;
    }
    50% {
        transform: translateY(0px) scale(0.95);
        opacity: 0.6;
    }
    75% {
        transform: translateY(30px) scale(1.05);
        opacity: 0.8;
    }
}

/* Responsive 3D Objects */
@media (max-width: 768px) {
    .floating-cube {
        width: 50px;
        height: 50px;
    }
    
    .floating-pyramid {
        border-left-width: 25px;
        border-right-width: 25px;
        border-bottom-width: 40px;
    }
    
    .floating-sphere {
        width: 40px;
        height: 40px;
    }
}

/* KLUE-inspired Color Palette */
:root {
    --primary-color: #DC143C; /* Crimson Red */
    --secondary-color: #6B7280; /* Gray */
    --success-color: #059669; /* Green */
    --warning-color: #D97706; /* Orange */
    --info-color: #0284C7; /* Blue */
    --light-bg: #F9FAFB;
    --dark-text: #1F2937;
}

/* Override Bootstrap Primary Color */
.bg-primary {
    background-color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}



.text-primary {
    color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* Korean Heading Optimization */
h1, h2, h3, h4, h5, h6 {
    word-break: keep-all;
    line-height: 1.4;
    font-weight: 700;
}

/* Enhanced Background Gradient */
body {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 50%, #f1f5f9 100%);
    min-height: 100vh;
}

/* Academic Interface Styling */
.card {
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Glass morphism effect for cards */
.card-glass {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

/* Hero section enhancement */
.hero-section {
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.05), rgba(2, 132, 199, 0.05));
    border-radius: 20px;
    padding: 3rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(220, 20, 60, 0.03) 0%, transparent 70%);
    animation: hero-glow 8s ease-in-out infinite;
}

@keyframes hero-glow {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
}

/* Navigation Styling */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.3rem;
    letter-spacing: -0.01em;
}

/* Button Styling */
.btn {
    border-radius: 8px;
    font-weight: 500;
    letter-spacing: -0.01em;
    transition: all 0.2s ease;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 1.1rem;
}

/* Form Elements */
.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #E5E7EB;
    transition: border-color 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 20, 60, 0.15);
}

/* Review Cards */
.review-item {
    background-color: #FAFBFC;
    border: 1px solid #E5E7EB !important;
}

/* Progress Bars for Ratings */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #E5E7EB;
}

.progress-bar {
    border-radius: 4px;
}

/* Star Ratings */
.text-warning {
    color: #F59E0B !important;
}

.fas.fa-star, .far.fa-star {
    color: #F59E0B;
}

/* Alert Styling */
.alert {
    border-radius: 10px;
    border: none;
    font-weight: 500;
}

.alert-success {
    background-color: #ECFDF5;
    color: #047857;
}

.alert-info {
    background-color: #EFF6FF;
    color: #1D4ED8;
}

.alert-warning {
    background-color: #FFFBEB;
    color: #92400E;
}

.alert-danger {
    background-color: #FEF2F2;
    color: #DC2626;
}

/* Badge Styling */
.badge {
    font-weight: 500;
    border-radius: 6px;
    letter-spacing: 0;
}

/* Table Styling */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table th {
    background-color: var(--light-bg);
    border-top: none;
    font-weight: 600;
    color: var(--dark-text);
}

/* Jumbotron Hero Section */
.jumbotron {
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #B91C3C 100%);
}

/* Footer */
footer {
    border-top: 1px solid #E5E7EB;
    background-color: var(--light-bg) !important;
}

/* Mobile-First Responsive Design */
@media (max-width: 768px) {
    body {
        font-size: 14px;
        line-height: 1.6;
    }
    
    h1, h2, h3, h4, h5, h6 {
        word-break: normal; /* Allow breaks on mobile */
    }
    
    .display-4 {
        font-size: 1.8rem !important;
        line-height: 1.3;
    }
    
    .lead {
        font-size: 1rem !important;
        margin-bottom: 1.5rem;
    }
    
    /* Hero Section Mobile */
    .hero-section {
        padding: 2rem 1rem !important;
        margin-bottom: 1.5rem;
    }
    
    .hero-section h1 {
        margin-bottom: 1rem;
    }
    
    .hero-section .lead {
        font-size: 0.95rem !important;
        line-height: 1.5;
    }
    
    /* Search Form Mobile */
    .input-group {
        flex-wrap: wrap;
    }
    
    .input-group .btn:first-child {
        border-radius: 8px 8px 0 0 !important;
        width: 100%;
        margin-bottom: -1px;
        z-index: 1;
    }
    
    .input-group .form-control {
        border-radius: 0 !important;
        border-top: none;
        font-size: 16px !important; /* Prevent zoom on iOS */
    }
    
    .input-group .btn:last-child {
        border-radius: 0 0 8px 8px !important;
        width: 100%;
        border-top: none;
    }
    
    /* Button Mobile Optimization */
    .btn-lg {
        font-size: 1rem;
        padding: 12px 20px;
    }
    
    /* Card Mobile */
    .card {
        margin-bottom: 1rem;
        border-radius: 12px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Navigation Mobile */
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    /* Statistics Cards Mobile */
    .stats-card {
        margin-bottom: 1rem;
        text-align: center;
    }
    
    /* Filter Section Mobile */
    .collapse .card-body {
        padding: 1rem;
    }
    
    .collapse .row .col-md-6 {
        margin-bottom: 1rem;
    }
}

/* Loading and Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.3s ease-out;
}

/* Korean Input Optimization */
input[type="text"], textarea {
    ime-mode: active; /* Enable Korean input method */
}

/* Search Results Highlighting */
.search-highlight {
    background-color: #FEF3C7;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* Point Display */
.point-display {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: var(--success-color);
}

/* Custom Utilities */
.text-muted {
    color: var(--secondary-color) !important;
}

.bg-light {
    background-color: var(--light-bg) !important;
}

/* Focus States for Accessibility */
.btn:focus, .form-control:focus, .form-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .navbar, footer, .btn, .alert {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .card {
        border: 1px solid #000;
        box-shadow: none;
    }
}

/* Emoji Reaction Styles */
.emoji-reaction-btn {
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.emoji-reaction-btn.user-reacted {
    background: #007bff;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.emoji-reaction-count {
    display: inline-block;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 0.85rem;
}

.emoji-reaction-count .emoji {
    font-size: 1.1rem;
    margin-right: 4px;
}

.emoji-reaction-count .count {
    font-weight: 600;
    color: #495057;
    margin-right: 4px;
}

.emoji-reaction-count .label {
    color: #6c757d;
    font-size: 0.75rem;
}

.emoji-reactions-container {
    border-top: 1px solid #e9ecef;
    padding-top: 12px;
}

.emoji-reactions-buttons {
    padding: 8px 0;
}

.emoji-feedback {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 500;
}

/* Badge colors */
.bg-purple {
    background-color: #6f42c1 !important;
}

/* How It Works Cards Interactive Styles */
.card[style*="cursor: pointer"] {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card[style*="cursor: pointer"]:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.card[style*="cursor: pointer"]:hover[style*="rgba(220, 20, 60, 0.3)"] {
    border-color: rgba(220, 20, 60, 0.6);
    box-shadow: 0 15px 35px rgba(220, 20, 60, 0.15);
}

.card[style*="cursor: pointer"]:hover[style*="rgba(5, 150, 105, 0.3)"] {
    border-color: rgba(5, 150, 105, 0.6);
    box-shadow: 0 15px 35px rgba(5, 150, 105, 0.15);
}

.card[style*="cursor: pointer"]:hover[style*="rgba(2, 132, 199, 0.3)"] {
    border-color: rgba(2, 132, 199, 0.6);
    box-shadow: 0 15px 35px rgba(2, 132, 199, 0.15);
}

.card[style*="cursor: pointer"]:active {
    transform: translateY(-4px);
    transition: all 0.1s ease;
}

/* Badge hover animation */
.card[style*="cursor: pointer"] .badge {
    transition: all 0.2s ease;
}

.card[style*="cursor: pointer"]:hover .badge {
    transform: scale(1.05);
}
