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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow: hidden;
    background: #ffffff;
    font-weight: 300;
}

#container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

#upload-section {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: white;
    padding: 3rem 4rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    z-index: 100;
}

h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #333;
    font-weight: 300;
    letter-spacing: -0.5px;
}

.upload-button {
    background: #ffffff;
    color: #333;
    border: 1px solid #d0d0d0;
    padding: 0.75rem 2rem;
    font-size: 0.95rem;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 300;
}

.upload-button:hover {
    border-color: #999;
    background: #fafafa;
}

.upload-button:active {
    background: #f0f0f0;
}

.info {
    margin-top: 1.5rem;
    color: #999;
    font-size: 0.85rem;
    font-weight: 300;
}

#viewer-container {
    width: 100%;
    height: 100%;
    display: none;
}

#controls-info {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 0.6rem 1.2rem;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    font-size: 0.8rem;
    color: #666;
    font-weight: 300;
    z-index: 1000;
}

#controls-info p {
    margin: 0;
}

.share-button {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ffffff;
    color: #333;
    border: 1px solid #d0d0d0;
    padding: 0.7rem;
    font-size: 0.9rem;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 300;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-button svg {
    display: block;
}

.share-button:hover {
    border-color: #999;
    background: #fafafa;
}

.share-button:active {
    background: #f0f0f0;
}

#loading-bar {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 200;
    background: white;
    padding: 2rem 3rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.loading-progress {
    width: 200px;
    height: 3px;
    background: #f0f0f0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.loading-progress::after {
    content: '';
    display: block;
    width: 40%;
    height: 100%;
    background: #333;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

.loading-text {
    color: #666;
    font-size: 0.9rem;
    font-weight: 300;
    margin: 0;
}

.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #ffffff;
    margin: 15% auto;
    padding: 2rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.modal-content h2 {
    font-size: 1.5rem;
    font-weight: 300;
    color: #333;
    margin-bottom: 1.5rem;
}

.close-modal {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover {
    color: #333;
}

.upload-section {
    text-align: center;
    padding: 2rem 0;
}

.spinner {
    border: 3px solid #f0f0f0;
    border-top: 3px solid #333;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.upload-section p {
    color: #666;
    font-size: 0.9rem;
    font-weight: 300;
}

.share-section {
    padding: 1rem 0;
}

.success-text {
    color: #4CAF50;
    font-size: 0.95rem;
    font-weight: 300;
    margin-bottom: 1rem;
}

.link-container {
    display: flex;
    gap: 0.5rem;
}

#share-url {
    flex: 1;
    padding: 0.6rem;
    border: 1px solid #d0d0d0;
    border-radius: 2px;
    font-size: 0.85rem;
    font-weight: 300;
    background: #fafafa;
    color: #333;
}

#share-url:focus {
    outline: none;
    border-color: #999;
}

.copy-btn {
    background: #ffffff;
    color: #333;
    border: 1px solid #d0d0d0;
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 300;
    white-space: nowrap;
}

.copy-btn:hover {
    border-color: #999;
    background: #fafafa;
}

.copy-btn:active {
    background: #f0f0f0;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

