/* Pretendard Font */
@font-face {
    font-family: 'Pretendard';
    src: url('/fonts/Pretendard-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Pretendard';
    src: url('/fonts/Pretendard-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Pretendard';
    src: url('/fonts/Pretendard-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

:root {
    /* Design Spec Color Palette */
    --white: #FFFFFF;
    --black: #000000;
    --gray-secondary: #8E8E93;
    --gray-progress-bg: #D1D1D6;
    --red-error: #FF3B30;
    --green-success: #34C759;
    --blue-progress: #007AFF;
    --button-default: #F2F2F7;
    --button-hover: #E5E5EA;
    
    /* Dimensions */
    --icon-size: 200px;
    --button-height: 64px;
    --border-radius: 10px;
}

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

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--white);
    color: var(--black);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    max-width: 100%;
    margin: 0 auto;
}

.screen-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.header {
    padding-top: 12px;
    padding-bottom: 0px;
    text-align: center;
    background: var(--white);
}

.header-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.header-heart-icon {
    height: 60px;
    width: auto;
    object-fit: contain;
}

/* Upload page specific spacing */
.upload-page .header-title {
    margin-bottom: 30px;
}

/* Progress page specific spacing */
.progress-page .header-title {
    margin-bottom: 30px;
}

/* Progress page caution message */
.progress-caution-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 100px;
}

.progress-caution-text {
    font-size: 18px;
    font-weight: 400;
    text-align: center;
    color: var(--gray-secondary);
    line-height: 1.5;
    max-width: 90%;
}

/* Scrolling Message */
.scrolling-message-container {
    width: 100%;
    height: 32px;
    overflow: hidden;
    background: var(--white);
    display: flex;
    align-items: center;
}

.scrolling-message {
    display: inline-block;
    white-space: nowrap;
    font-size: 20px;
    font-weight: 400;
    color: var(--gray-secondary);
    animation: scroll-left 15s linear infinite;
    padding-left: 100%;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 20px 12px 20px;
}

/* Icon Container */
.icon-container {
    width: var(--icon-size);
    height: var(--icon-size);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    position: relative;
}

.icon-container i {
    font-size: 200px !important;
}

.icon-container.primary {
    color: var(--red-error);
}

.icon-container.success {
    color: var(--green-success);
}

.icon-container.destructive {
    background: var(--white);
    color: var(--red-error);
}

/* Camera Upload Button */
.camera-upload-button {
    width: 320px;
    height: 320px;
    background: transparent;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 0;
}

.camera-upload-button:active {
    transform: scale(0.95);
}

.camera-icon-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.camera-upload-button:active .camera-icon-wrapper {
    filter: drop-shadow(0 0 20px rgba(255, 59, 48, 0.4));
}

.upload-icon-image {
    width: 300px;
    height: 300px;
    object-fit: contain;
    display: block;
    transition: all 0.15s ease;
}

.camera-base {
    font-size: 140px !important;
    color: var(--white);
}

.camera-arrow {
    position: absolute;
    font-size: 56px !important;
    color: var(--white);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Typography */
.title {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    color: var(--black);
}

.description {
    font-size: 18px;
    font-weight: 400;
    text-align: center;
    color: var(--gray-secondary);
    line-height: 1.6;
    max-width: 90%;
}

/* Button Group */
.button-group {
    display: flex;
    gap: 12px;
    width: 90%;
    max-width: 500px;
    margin-top: 20px;
}

.button-group .btn {
    flex: 1;
    width: auto;
}

/* Buttons */
.btn {
    width: 90%;
    max-width: 500px;
    height: var(--button-height);
    font-size: 22px;
    font-weight: 700;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--red-error);
    color: var(--white);
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: var(--button-default);
    color: var(--black);
}

.btn-secondary:hover {
    background: var(--button-hover);
}

.btn-storage {
    background: #FFFFFF;
    color: #FF5A7A;
    border: 2px solid #FF5A7A;
    margin-top: 12px;
}

.btn-storage:active {
    background: #FFF5F7;
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Progress Circle */
.progress-circle {
    position: relative;
    width: 200px;
    height: 200px;
}

.progress-circle svg {
    transform: rotate(-90deg);
}

.progress-circle-bg {
    fill: none;
    stroke: var(--gray-progress-bg);
    stroke-width: 8;
}

.progress-circle-fill {
    fill: none;
    stroke: var(--blue-progress);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s ease;
    stroke-dasharray: 565.49;
    stroke-dashoffset: 565.49;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: 700;
    color: var(--black);
}

.progress-title {
    font-size: 20px;
    font-weight: 400;
    color: var(--gray-secondary);
    text-align: center;
    margin-top: 16px;
}

/* Upload Input Styling */
.upload-trigger {
    display: block;
    width: 80%;
    max-width: 500px;
    margin-top: 20px;
}

.upload-input {
    display: none;
}

/* Video Preview */
.video-preview {
    width: 100%;
    max-width: 90%;
    border-radius: var(--border-radius);
    margin-top: 24px;
    background: black;
}

/* Video Message */
.video-message {
    margin-top: 45px;
    text-align: center;
    max-width: 90%;
}

.video-message p {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: var(--gray-secondary);
    line-height: 1.5;
    margin: 4px 0;
}

/* Error Description (smaller font for error details) */
.error-description {
    font-size: 18px;
    font-weight: 400;
    text-align: center;
    color: var(--gray-secondary);
    line-height: 1.6;
    max-width: 90%;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Upload Note - Legal Notice */
#uploadNote {
    display: block !important;
    visibility: visible !important;
    position: relative;
    z-index: 2;
    margin-top: 10px;
    text-align: left;
    font-size: 13px;
    color: #555;
    line-height: 1.7;
    word-break: keep-all;
    white-space: normal;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

#uploadNote p {
    margin: 4px 0;
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    .content-area {
        padding: 12px 16px;
    }
}
