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

body {
    font-family: 'Noto Sans Sinhala', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

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

header {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    font-weight: 700;
}

header h1 a {
    color: white;
    text-decoration: none;
}

header h1 a:hover {
    color: #58a6ff;
}

header h2 {
    font-size: 2em;
    margin-top: 15px;
    color: #a0aec0;
}

.subtitle {
    font-size: 1.2em;
    color: #cbd5e0;
}

/* Apps Grid */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 50px;
}

.app-card {
    background: linear-gradient(135deg, #f6f8fb 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid #e2e8f0;
}

.app-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.app-card.coming-soon {
    opacity: 0.6;
    cursor: not-allowed;
}

.app-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.app-card h2 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: #2d3748;
}

.app-card p {
    font-size: 1.1em;
    color: #4a5568;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
    font-size: 1em;
    margin: 5px;
}

.btn:hover {
    background: #5568d3;
    transform: scale(1.05);
}

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

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #63397d 100%);
}

.btn-large {
    padding: 18px 40px;
    font-size: 1.2em;
}

/* Form Container */
.form-container {
    padding: 50px;
    max-width: 600px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2d3748;
}

.form-group input[type="text"],
.form-group select,
.form-group input[type="file"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1em;
    font-family: 'Noto Sans Sinhala', sans-serif;
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 8px;
    color: #718096;
    font-size: 0.9em;
}

/* Success Message */
.success-message {
    padding: 50px;
    text-align: center;
}

.success-message h3 {
    font-size: 2em;
    color: #48bb78;
    margin-bottom: 30px;
}

.success-message h4 {
    font-size: 1.5em;
    color: #2d3748;
    margin: 30px 0 20px;
}

.card-preview-section {
    margin: 30px 0;
}

#card-preview-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.share-box {
    background: #f7fafc;
    padding: 30px;
    border-radius: 12px;
    margin: 30px 0;
    border: 2px solid #e2e8f0;
}

.share-box p {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #4a5568;
}

.share-box input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    font-size: 1em;
    margin-bottom: 15px;
    font-family: monospace;
}

/* Personality View */
.personality-view {
    padding: 50px;
}

.personality-image {
    text-align: center;
    margin-bottom: 40px;
}

.personality-image img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.personality-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.detail-card {
    background: linear-gradient(135deg, #f6f8fb 0%, #e9ecef 100%);
    padding: 30px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}

.detail-card h3 {
    font-size: 1.5em;
    color: #667eea;
    margin-bottom: 15px;
}

.detail-card p {
    font-size: 1.1em;
    line-height: 1.8;
    color: #2d3748;
}

.share-section {
    text-align: center;
    margin: 50px 0;
    padding: 40px;
    background: #f7fafc;
    border-radius: 12px;
}

.share-section h3 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #2d3748;
}

.cta-section {
    text-align: center;
    margin: 50px 0;
    padding: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.cta-section p {
    font-size: 1.3em;
    margin-bottom: 20px;
}

/* Footer */
footer {
    background: #2d3748;
    color: white;
    padding: 30px;
    text-align: center;
}

footer a {
    color: #58a6ff;
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    
    header h2 {
        font-size: 1.5em;
    }
    
    .apps-grid,
    .form-container,
    .personality-view {
        padding: 30px 20px;
    }
    
    .app-card {
        padding: 30px 20px;
    }

    #capture-area {
        width: 100% !important;
        height: auto !important;
        min-height: 600px;
    }

    #card-preview-container {
        overflow-x: auto;
    }
}
