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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --background: #0f172a;
    --surface: #1e293b;
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --border: #334155;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
    padding-top: 2rem;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Issue Cards */
.issues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.issue-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text);
    display: block;
}

.issue-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.issue-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.issue-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Wallet Grid */
.wallet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.wallet-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.wallet-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.wallet-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
}

.wallet-logo-img {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 8px;
}

.wallet-logo-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.wallet-card h3 {
    font-size: 1.1rem;
    color: var(--text);
}

/* Connection Screen */
.connection-container {
    max-width: 600px;
    margin: 4rem auto;
    text-align: center;
}

.connection-box {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 3rem 2rem;
}

.wallet-info {
    margin-bottom: 2rem;
}

.wallet-info .wallet-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
    font-size: 3rem;
}

.progress-container {
    margin: 2rem 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.status-text {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
    color: var(--error);
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--surface);
    border: 2px solid var(--border);
}

/* Form */
.form-container {
    max-width: 600px;
    margin: 2rem auto;
}

.form-box {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

.form-group select,
.form-group textarea,
.form-group input {
    width: 100%;
    padding: 0.875rem;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group select:focus,
.form-group textarea:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.error-field {
    border-color: var(--error) !important;
}

.error-text {
    color: var(--error);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Success Page */
.success-container {
    max-width: 600px;
    margin: 4rem auto;
    text-align: center;
}

.success-box {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 3rem 2rem;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--success), #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 3rem;
}

.success-box h2 {
    color: var(--success);
    margin-bottom: 1rem;
}

.success-box p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Loading Animation */
.spinner {
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

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

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .issues-grid,
    .wallet-grid {
        grid-template-columns: 2fr auto;
        gap: 1rem;
    }
    
    .connection-box,
    .form-box,
    .success-box {
        padding: 2rem 1.5rem;
    }
}

/* Hide element */
.hidden {
    display: none !important;
}
