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

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #f5f5f5;
    color: #333;
    position: relative;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

.loading-container p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 100%;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.error-container h2 {
    font-size: 20px;
    font-weight: bold;
    color: #d32f2f;
    margin-bottom: 8px;
}

.error-container p {
    font-size: 16px;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.5;
}

.retry-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.retry-btn:hover {
    background-color: #0056b3;
}

.retry-btn:active {
    transform: translateY(1px);
}

#sumsub-websdk-container {
    width: 100%;
    max-width: 800px;
    height: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

#sumsub-websdk-container iframe {
    width: 100% !important;
    height: 100% !important;
    border: none;
    display: block;
}

/* Responsive design */
@media (max-width: 768px) {
    #app {
        padding: 10px;
        min-height: 100vh;
        justify-content: flex-start;
        padding-top: 10px;
        width: 100%;
    }
    
    #sumsub-websdk-container {
        height: calc(100vh - 20px);
        min-height: 500px;
        max-height: none;
        border-radius: 8px;
        width: 100%;
        max-width: 100%;
    }
    
    #sumsub-websdk-container iframe {
        min-height: 100%;
    }
    
    .error-container {
        padding: 24px;
        margin: 0 10px;
    }
    
    .error-container h2 {
        font-size: 18px;
    }
    
    .error-container p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    #app {
        padding: 5px;
        padding-top: 5px;
        width: 100%;
    }
    
    #sumsub-websdk-container {
        height: calc(100vh - 10px);
        min-height: 400px;
        max-height: none;
        border-radius: 6px;
        width: 100%;
        max-width: 100%;
    }
    
    #sumsub-websdk-container iframe {
        min-height: 100%;
    }
    
    .error-container {
        padding: 20px;
        margin: 0 5px;
    }
    
    .error-icon {
        font-size: 36px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    #sumsub-websdk-container {
        height: calc(100vh - 10px);
        min-height: 350px;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
