/* ========================================
   Additional Page Styles - 아신요신
   Write, Exam, Products Pages
   ======================================== */

/* ========================================
   Page Header
   ======================================== */

.page-header {
    padding: 10rem 0 3rem;
    text-align: center;
}

.header-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.header-content h1 i {
    color: var(--primary-color);
}

.header-content p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* ========================================
   Write Page Styles
   ======================================== */

.write-section {
    padding: 2rem 0 4rem;
}

.write-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.write-form {
    padding: 2.5rem;
}

.form-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-section h3 i {
    color: var(--primary-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid rgba(196, 86, 61, 0.2);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    transition: var(--transition-normal);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 4px rgba(196, 86, 61, 0.1);
}

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

.form-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Ingredients & Steps */
.ingredients-list,
.steps-list {
    margin-bottom: 1.5rem;
}

.ingredient-item,
.step-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(196, 86, 61, 0.05);
    border-radius: var(--radius-md);
}

.ingredient-item .form-input {
    margin-bottom: 0;
}

.ingredient-name {
    flex: 2;
}

.ingredient-amount {
    flex: 1;
}

.step-item {
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.125rem;
}

.step-content {
    flex: 1;
}

.btn-remove {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(49, 94, 73, 0.1);
    border: 1px solid rgba(49, 94, 73, 0.2);
    color: var(--secondary-color);
}

.btn-remove:hover {
    background: rgba(49, 94, 73, 0.2);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Write Sidebar */
.write-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    padding: 1.5rem;
}

.sidebar-card h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-card h4 i {
    color: var(--primary-color);
}

.guide-list {
    list-style: none;
}

.guide-list li {
    padding: 0.75rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.guide-list li:last-child {
    border-bottom: none;
}

.guide-list i {
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.popular-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.popular-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(196, 86, 61, 0.05);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.popular-item:hover {
    background: rgba(196, 86, 61, 0.1);
    transform: translateX(5px);
}

.popular-item .rank {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    font-weight: 700;
}

.popular-info h5 {
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.popular-info p {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin: 0;
}

.popular-info i {
    color: var(--secondary-color);
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(196, 86, 61, 0.05);
    border-radius: var(--radius-md);
}

.stat-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
}

.stat-info h5 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
}

.stat-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Preview Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.modal-content {
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-header h3 {
    margin: 0;
}

.modal-body {
    line-height: 1.8;
}

.recipe-preview h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.recipe-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.recipe-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(196, 86, 61, 0.1);
    border-radius: var(--radius-md);
}

.recipe-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
}

.recipe-meta i {
    color: var(--primary-color);
}

.recipe-section {
    margin-bottom: 2rem;
}

.recipe-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recipe-section ul,
.recipe-section ol {
    padding-left: 1.5rem;
}

.recipe-section li {
    margin-bottom: 0.5rem;
}

.recipe-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ========================================
   Exam Page Styles
   ======================================== */

.exam-selection {
    padding: 2rem 0 4rem;
}

.exam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.exam-card {
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-normal);
}

.exam-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    font-size: 2.5rem;
    color: white;
}

.exam-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.exam-desc {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.exam-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.exam-stats span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.exam-difficulty {
    margin-top: 1rem;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-medium {
    background: rgba(255, 193, 7, 0.2);
    color: #FFC107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.badge-hard {
    background: rgba(49, 94, 73, 0.2);
    color: var(--secondary-color);
    border: 1px solid rgba(49, 94, 73, 0.3);
}

/* Exam Quiz */
.exam-quiz {
    padding: 2rem 0 4rem;
}

.exam-header {
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.exam-info h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.exam-info p {
    color: var(--text-secondary);
    margin: 0;
}

.exam-timer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.exam-progress {
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(196, 86, 61, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.question-card {
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.question-number {
    font-size: 0.9375rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.question-text {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.question-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.question-option {
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(196, 86, 61, 0.2);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

.question-option:hover {
    background: rgba(196, 86, 61, 0.05);
    border-color: rgba(196, 86, 61, 0.4);
}

.question-option.selected {
    background: rgba(196, 86, 61, 0.15);
    border-color: var(--primary-color);
}

.question-option label {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    font-size: 1.0625rem;
}

.question-option input[type="radio"] {
    display: none;
}

.option-number {
    flex-shrink: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(196, 86, 61, 0.2);
    color: var(--primary-color);
    border-radius: 50%;
    font-weight: 700;
}

.question-option.selected .option-number {
    background: var(--primary-color);
    color: white;
}

.exam-navigation {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.question-navigator {
    padding: 2rem;
}

.question-navigator h4 {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.question-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 0.75rem;
}

.question-nav-btn {
    width: 50px;
    height: 50px;
    border: 2px solid rgba(196, 86, 61, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.question-nav-btn:hover {
    background: rgba(196, 86, 61, 0.1);
    border-color: var(--primary-color);
}

.question-nav-btn.answered {
    background: rgba(196, 86, 61, 0.2);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.question-nav-btn.current {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.question-nav-btn.bookmarked::after {
    content: '★';
    position: absolute;
    top: -5px;
    right: -5px;
    color: var(--accent-color);
    font-size: 1.25rem;
}

/* Exam Result */
.exam-result {
    padding: 2rem 0 4rem;
}

.result-card {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem;
    text-align: center;
}

.result-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    font-size: 3rem;
    color: white;
}

.result-card h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.result-card p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.result-score {
    margin-bottom: 3rem;
}

.score-circle {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-text span {
    font-size: 4rem;
    font-weight: 900;
    color: var(--primary-color);
}

.score-text small {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.result-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.detail-item {
    text-align: center;
}

.detail-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.75rem;
}

.detail-icon.correct {
    background: rgba(196, 86, 61, 0.2);
    color: var(--primary-color);
}

.detail-icon.wrong {
    background: rgba(49, 94, 73, 0.2);
    color: var(--secondary-color);
}

.detail-icon.time {
    background: rgba(255, 193, 7, 0.2);
    color: #FFC107;
}

.detail-info h4 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.detail-info p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 0;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Progress Section */
.progress-section {
    padding: 4rem 0;
}

.progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.progress-card {
    padding: 2rem;
}

.progress-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.progress-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
}

.progress-header h4 {
    font-size: 1.125rem;
    margin: 0;
}

.progress-value {
    margin-bottom: 1rem;
}

.value-large {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary-color);
}

.value-unit {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-left: 0.5rem;
}

.progress-trend {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.progress-trend.up {
    color: var(--primary-color);
}

.progress-trend i {
    margin-right: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    .write-grid {
        grid-template-columns: 1fr;
    }
    
    .write-sidebar {
        order: -1;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .exam-grid {
        grid-template-columns: 1fr;
    }
    
    .result-details {
        grid-template-columns: 1fr;
    }
    
    .exam-header {
        flex-direction: column;
        gap: 1rem;
    }
}
