/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f7;
    color: #1d1d1f;
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 40px;
}

.logo {
    font-size: 36px;
    font-weight: 700;
    color: #FF5A5F;
    margin-bottom: 8px;
}

.tagline {
    color: #86868b;
    font-size: 18px;
}

/* Loading State */
.loading-container {
    text-align: center;
    padding: 100px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #FF5A5F;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Error State */
.error-container {
    text-align: center;
    padding: 100px 20px;
}

.error-icon {
    font-size: 72px;
    margin-bottom: 20px;
}

.error-container h2 {
    font-size: 28px;
    margin-bottom: 12px;
    color: #1d1d1f;
}

.error-container p {
    font-size: 18px;
    color: #86868b;
    margin-bottom: 30px;
}

/* Vault Card */
.vault-card {
    background: white;
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 30px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.vault-header {
    padding: 30px;
    border-bottom: 1px solid #e7e7e9;
}

.vault-header h2 {
    font-size: 28px;
    margin-bottom: 12px;
    color: #1d1d1f;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

.vault-meta {
    font-size: 16px;
    color: #86868b;
}

.vault-meta p {
    margin-bottom: 4px;
}

.vault-meta span {
    color: #1d1d1f;
    font-weight: 500;
}

/* Vault Body */
.vault-body {
    padding: 30px;
}

.text-content {
    white-space: pre-wrap;
    font-size: 16px;
    line-height: 1.8;
    color: #1d1d1f;
    margin-bottom: 30px;
    background-color: #f5f5f7;
    padding: 20px;
    border-radius: 12px;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Files Section */
.files-section {
    margin-top: 30px;
}

.files-section h3 {
    font-size: 20px;
    margin-bottom: 16px;
    color: #1d1d1f;
}

.files-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background-color: #f5f5f7;
    border-radius: 12px;
    transition: background-color 0.2s;
}

.file-item:hover {
    background-color: #e7e7e9;
}

.file-icon {
    font-size: 24px;
    margin-right: 12px;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: #1d1d1f;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

.file-size {
    font-size: 14px;
    color: #86868b;
}

.file-download {
    color: #FF5A5F;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-download:hover {
    background-color: rgba(255, 90, 95, 0.1);
    transform: translateY(-1px);
}

.file-download svg {
    width: 20px;
    height: 20px;
}

/* Vault Footer */
.vault-footer {
    padding: 20px 30px;
    background-color: #f5f5f7;
    border-top: 1px solid #e7e7e9;
}

.security-note {
    font-size: 14px;
    color: #86868b;
    text-align: center;
}

/* Actions */
.actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* Buttons */
.button {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.button-primary {
    background-color: #FF5A5F;
    color: white;
}

.button-primary:hover {
    background-color: #e54348;
    transform: translateY(-1px);
}

.button-secondary {
    background-color: white;
    color: #1d1d1f;
    border: 1px solid #e7e7e9;
}

.button-secondary:hover {
    background-color: #f5f5f7;
    transform: translateY(-1px);
}

/* Print Styles */
@media print {
    body {
        background-color: white;
    }
    
    .container {
        max-width: 100%;
    }
    
    .header, .actions, .file-download {
        display: none;
    }
    
    .vault-card {
        box-shadow: none;
        border: 1px solid #e7e7e9;
    }
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 16px;
    }
    
    .header {
        padding-top: 20px;
        margin-bottom: 24px;
    }
    
    .logo {
        font-size: 28px;
    }
    
    .vault-header, .vault-body {
        padding: 20px;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .button {
        width: 100%;
    }
}