#safe-card-app {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#safe-card-app *,
#safe-card-app *::before,
#safe-card-app *::after {
    box-sizing: border-box;
}

.safe-card-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 40px 50px;
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.app-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-icon {
    font-size: 56px;
    margin-bottom: 16px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.app-header h1 {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.app-header p {
    color: #94a3b8;
    font-size: 1rem;
    margin: 0;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    padding: 35px 40px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    width: 100%;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.input-group.full-width {
    grid-column: 1 / -1;
}

.input-group label {
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 600;
    padding-left: 4px;
    margin: 0;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff !important;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    -webkit-text-fill-color: #ffffff;
    opacity: 1;
}

.input-group input::placeholder,
.input-group textarea::placeholder {
    color: #64748b !important;
    -webkit-text-fill-color: #64748b;
    opacity: 1;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.15);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
}

.input-group input:-webkit-autofill,
.input-group input:-webkit-autofill:hover,
.input-group input:-webkit-autofill:focus,
.input-group input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #1e293b inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff;
}

.input-group select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
    padding-right: 48px;
    background-color: rgba(255, 255, 255, 0.08);
}

.input-group select option {
    background: #1a1a2e;
    color: #ffffff;
    padding: 12px;
}

.input-group textarea {
    resize: none;
    min-height: 80px;
}

.btn-generate,
.btn-download,
.btn-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 32px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-generate {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    margin-top: 8px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

.btn-generate:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.2rem;
}

.preview-section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.5s ease;
    width: 100%;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.preview-section h2 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 24px 0;
}

.canvas-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 24px auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

#cardCanvas {
    width: 100%;
    height: auto;
    display: block;
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-download {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
}

.btn-share {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

.share-tip {
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin: 0 auto;
    max-width: 600px;
}

/* Shake animation for validation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.shake {
    animation: shake 0.3s ease;
    border-color: #ef4444 !important;
}

/* Fix for WordPress themes overriding input styles */
#safe-card-app input[type="text"],
#safe-card-app input[type="tel"],
#safe-card-app select,
#safe-card-app textarea {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
    height: auto !important;
    line-height: normal !important;
    box-shadow: none !important;
    margin: 0 !important;
}

#safe-card-app input[type="text"]:focus,
#safe-card-app input[type="tel"]:focus,
#safe-card-app select:focus,
#safe-card-app textarea:focus {
    background-color: rgba(59, 130, 246, 0.15) !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .safe-card-container {
        padding: 25px 20px;
        border-radius: 12px;
    }
    
    .form-section {
        padding: 25px 20px;
        gap: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .app-header h1 {
        font-size: 1.5rem;
    }
    
    .app-header p {
        font-size: 0.9rem;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .btn-generate,
    .btn-download,
    .btn-share {
        padding: 16px 24px;
        font-size: 1rem;
    }
    
    .header-icon {
        font-size: 48px;
    }
}
