:root {
    --primary-color: #4a90e2;
    --primary-hover: #357abd;
    --success-color: #10b981;
    --success-hover: #059669;
    --bg-gradient-start: #89f7fe;
    --bg-gradient-end: #66a6ff;
    --text-color: #333;
    --text-secondary: #666;
    --card-bg: rgba(255, 255, 255, 0.95);
    --input-bg: #f9fafb;
    --border-color: #e5e7eb;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    color: var(--text-color);
}

/* Header & Stats */
.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    margin-top: 40px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

.stats-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Main Card */
.card {
    background: var(--card-bg);
    width: 100%;
    max-width: 480px;
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--input-bg);
    transition: all 0.3s ease;
    color: var(--text-color);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1);
}

/* Input Group for Code */
.input-group {
    display: flex;
    gap: 10px;
}

.btn-code {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 120px;
}

.btn-code:hover:not(:disabled) {
    background: var(--success-hover);
    transform: translateY(-1px);
}

.btn-code:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

/* Footer */
.footer {
    margin-top: 30px;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.footer a {
    color: white;
    text-decoration: underline;
    font-weight: 600;
}

/* Modal/Result Styles */
.result-container {
    margin-top: 20px;
    display: none;
}

.account-card {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
}

.account-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.account-value {
    font-family: monospace;
    font-weight: 600;
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    user-select: all;
}

.copy-btn {
    background: white;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #fff;
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left: 5px solid var(--success-color);
}

.toast.error {
    border-left: 5px solid #ef4444;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header i {
    color: #1f2937;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.95rem;
}

.info-label {
    color: #6b7280;
    font-weight: 600;
}

.info-value {
    color: #1f2937;
    text-align: right;
    max-width: 70%;
    word-break: break-all;
}

.warning-box {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    color: #92400e;
    padding: 16px;
    border-radius: 8px;
    margin: 25px 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.btn-secondary,
.btn-primary {
    padding: 12px;
    border-radius: 10px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-secondary {
    background: #818cf8;
    color: white;
}

.btn-secondary:hover {
    background: #6366f1;
}

.btn-primary {
    background: #60a5fa;
    color: white;
}

.btn-primary:hover {
    background: #3b82f6;
}

/* Alert Modal Styles */
.alert-content {
    max-width: 400px;
    padding: 30px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.alert-header {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.alert-icon.error {
    color: #ef4444;
}

.alert-icon.success {
    color: #10b981;
}

.alert-message {
    font-size: 1rem;
    color: #4b5563;
    line-height: 1.6;
    padding: 10px 0;
    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
}

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 1rem;
    margin-top: 10px;
    background: #3b82f6;
    color: white;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-full:hover {
    background: #2563eb;
}