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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.header p {
    opacity: 0.9;
    font-size: 14px;
}

.screen {
    display: none;
    padding: 40px;
}

.screen.active {
    display: block;
}

.step-indicator {
    background: #f0f0f0;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 20px;
}

h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
}

.landing-content {
    text-align: center;
}

.landing-content h2 {
    margin-bottom: 40px;
}

.option-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.option-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 40px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.option-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.option-card .icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.option-card h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 20px;
}

.option-card p {
    color: #666;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

input:focus {
    outline: none;
    border-color: #667eea;
}

.hint {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.size-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    justify-content: flex-end;
}

.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    font-size: 14px;
}

.result.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.result.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.result.info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

#signaturePad {
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: crosshair;
    display: block;
    width: 100%;
    background: white;
    margin-bottom: 20px;
}

#pdfPreviewContainer, #signDocPreviewContainer {
    max-height: 500px;
    overflow-y: auto;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    background: #f9f9f9;
    margin-bottom: 20px;
}

.pdf-page {
    position: relative;
    margin-bottom: 20px;
    display: inline-block;
}

.pdf-page canvas {
    display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
    background: white;
    cursor: crosshair;
}

.pdf-page-label {
    text-align: center;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

.marker-overlay {
    position: absolute;
    border: 3px dashed #667eea;
    background: rgba(102, 126, 234, 0.1);
    pointer-events: none;
}

.marker-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #667eea;
    font-weight: bold;
    font-size: 12px;
    text-shadow: 0 0 3px white;
}

.sign-marker-overlay {
    border-color: #ff9800;
    background: rgba(255, 152, 0, 0.1);
}

.sign-marker-label {
    color: #ff9800;
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .option-cards {
        grid-template-columns: 1fr;
    }
    
    .container {
        margin: 10px;
    }
    
    .screen {
        padding: 20px;
    }
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 0;
}

.footer p {
    margin: 5px 0;
    font-size: 14px;
}

.footer-tagline {
    opacity: 0.9;
    font-style: italic;
    font-size: 13px;
    margin-top: 10px !important;
}

@media (max-width: 768px) {
    .footer {
        padding: 20px 15px;
    }
    
    .footer p {
        font-size: 12px;
    }
    
    .footer-tagline {
        font-size: 11px;
    }
}
