/* Cardano Mixer - Main Styles */
/* Custom styles for React Bits components */
.react-bits-container {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Monospace font for addresses and code */
.mono-font {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
}

/* Monospace font for address input fields */
.address-input {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace !important;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

/* Enhanced typography with Poppins */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
}

/* Better button styling with Poppins */
button {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: white;
}

button:hover {
    color: black !important;
}

/* Cardano color palette */
:root {
    --primary-blue: #0033ad;
    --primary-purple: #5b21b6;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --text-gray: #6b7280;
    --text-dark: #1f2937;
    --cardano-blue: #0033ad;
    --cardano-light-blue: #1e40af;
}

.gradient-bg {
    background: linear-gradient(135deg, var(--cardano-blue), var(--cardano-light-blue));
}

/* Particles background for entire page */
.particles-bg {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #0f172a 100%);
    overflow-x: hidden;
}

/* Particles canvas styling */
.particles-bg canvas {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: -1 !important;
}

.hero-bg {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 10;
}

/* Expanded particles background when form is open */
.particles-bg.expanded {
    padding: 3rem 0 12rem 0;
}

/* Анимация поднятия текста при появлении формы */
.hero-content {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 20;
}

.hero-content.expanded {
    transform: translateY(-200px);
    opacity: 0.3;
}

.hero-title {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 25;
}

.hero-title.expanded {
    transform: translateY(-250px) scale(0.7);
    opacity: 0.2;
}

.hero-description {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 25;
}

.hero-description.expanded {
    transform: translateY(-250px) scale(0.8);
    opacity: 0.2;
}

.stats-grid {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-grid.expanded {
    transform: translateY(-200px);
    opacity: 0.2;
}

/* Cardano-themed animations */
@keyframes cardano-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.cardano-pulse {
    animation: cardano-pulse 2s infinite;
}

/* Cardano-themed gradients */
.cardano-gradient {
    background: linear-gradient(135deg, #0033ad, #1e40af, #3b82f6);
}

.cardano-gradient-text {
    background: linear-gradient(135deg, #0033ad, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced text visibility */
.hero-title, .hero-description, .stat-card, .footer-content {
    text-shadow: none;
}

/* Better contrast for buttons */
.cardano-btn {
    box-shadow: 0 4px 15px rgba(0, 51, 173, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Enhanced form visibility */
.form-container {
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid rgba(0, 51, 173, 0.1);
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 30;
    opacity: 0;
    transform: translateY(40px) scale(0.9);
    animation: formContainerFadeIn 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes formContainerFadeIn {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes formContainerFadeOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-40px) scale(0.9);
    }
}

/* Form centering when expanded */
.form-section {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(50px) scale(0.9);
    animation: formFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.form-section.expanded {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 50;
    opacity: 1;
    transform: translateY(0) scale(1);
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Auto-scaling for form content to fit viewport */
.form-section.expanded .container {
    max-width: 100%;
    max-height: 100%;
    overflow: auto;
    transform-origin: center center;
    transition: transform 0.3s ease;
}

/* Responsive scaling based on viewport */
@media (max-height: 600px) {
    .form-section.expanded .container {
        transform: scale(0.8);
    }
}

@media (max-height: 500px) {
    .form-section.expanded .container {
        transform: scale(0.7);
    }
}

@media (max-height: 400px) {
    .form-section.expanded .container {
        transform: scale(0.6);
    }
}

@media (max-width: 768px) and (max-height: 600px) {
    .form-section.expanded .container {
        transform: scale(0.7);
    }
}

@media (max-width: 480px) and (max-height: 500px) {
    .form-section.expanded .container {
        transform: scale(0.6);
    }
}

@keyframes formFadeIn {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes formFadeOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
}

/* Анимация для кнопки закрытия */
.close-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.close-btn:hover {
    color: #ef4444;
}

/* Плавная анимация для всех элементов формы */
.form-section * {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Анимация для полей ввода */
.form-section input, .form-section textarea, .form-section select {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-section input:focus, .form-section textarea:focus, .form-section select:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 3px rgba(0, 51, 173, 0.2);
}

/* Анимация для кнопок в форме */
.form-section button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-section button:hover {
    transform: translateY(-2px);
}

/* Анимация для заголовков */
.form-section h2 {
    animation: titleSlideIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes titleSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Ensure content is above background */
.react-bits-container {
    position: relative;
    z-index: 10;
}

.hero-content {
    position: relative;
    z-index: 20;
}

/* Stats and buttons styling */
.stats-grid {
    position: relative;
    z-index: 25;
}

.stat-card {
    position: relative;
    z-index: 25;
}

.cardano-btn {
    position: relative;
    z-index: 25;
}

.cardano-btn:hover {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 51, 173, 0.3);
    color: black !important;
}

/* Cardano-themed input focus */
.cardano-input:focus {
    border-color: #0033ad;
    box-shadow: 0 0 0 3px rgba(0, 51, 173, 0.1);
}

/* Loading animation */
.loading-spinner {
    border: 3px solid rgba(0, 51, 173, 0.1);
    border-top: 3px solid #0033ad;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

/* Success/Error states */
.success-state {
    border-color: #10b981;
    background-color: rgba(16, 185, 129, 0.1);
}

.error-state {
    border-color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}

/* Footer styling */
.footer-content {
    position: relative;
    z-index: 25;
}

/* Additional z-index fixes */
.particles-bg * {
    position: relative;
}

.particles-bg canvas {
    position: absolute !important;
    z-index: -1 !important;
}

/* Small notification styles */
.small-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(16, 185, 129, 0.95);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    animation: slideInRight 0.3s ease-out;
}

.small-notification.error {
    background: rgba(239, 68, 68, 0.95);
    border-color: rgba(239, 68, 68, 0.3);
}

.small-notification-icon {
    margin-right: 8px;
    font-size: 16px;
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(100%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Overlay only for confirmation dialogs */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9998;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Confirmation dialog styles */
.confirmation-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    padding: 0;
    z-index: 9999;
    backdrop-filter: blur(20px);
    border: 2px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: notificationSlideIn 0.3s ease-out;
    min-width: 400px;
    max-width: 500px;
}

.confirmation-content {
    padding: 30px;
    text-align: center;
}

.confirmation-icon {
    font-size: 48px;
    color: #f59e0b;
    margin-bottom: 20px;
}

.confirmation-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
    font-family: 'Poppins', sans-serif;
}

.confirmation-message {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 30px;
    line-height: 1.5;
}

.confirmation-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.confirmation-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    min-width: 140px;
}

.confirmation-btn-cancel {
    background: #6b7280;
    color: white;
}

.confirmation-btn-cancel:hover {
    background: #4b5563;
    transform: translateY(-2px);
}

.confirmation-btn-confirm {
    background: #ef4444;
    color: white;
}

.confirmation-btn-confirm:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

/* Contact and Features sections */
.contact-section, .features-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 2rem;
    margin: 2rem 0;
}

.contact-form {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0.75rem;
    padding: 1.5rem;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    animation: contactFormFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes contactFormFadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes contactFormFadeOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Responsive design */
@media (max-width: 768px) {
    .hero-title.expanded {
        transform: translateY(-100px) scale(0.9);
    }
    
    .hero-content.expanded {
        transform: translateY(-80px);
    }
    
    .particles-bg.expanded {
        padding: 2rem 0 8rem 0;
    }
    
    .contact-section, .features-section {
        padding: 1rem;
        margin: 1rem 0;
    }
}

/* Custom flex-1 override */
.flex-1 {
    flex: 1 1 0%;
}

/* SEO H1 tag - hidden but accessible to search engines */
.seo-h1 {
    position: absolute;
    left: -9999px;
    top: -9999px;
    visibility: hidden;
}

/* Container with z-index for proper layering */
.container-relative {
    position: relative;
    z-index: 20;
}

/* Onion button styles */
.onion-button {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.onion-button a {
    background: #ff6b35;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.onion-button a:hover {
    background: #e55a2b;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

/* Form input widths */
.form-input-sm {
    width: 12rem;
}

.form-input-md {
    width: 18rem;
}

/* Status indicator with animation */
.status-indicator {
    position: relative;
    display: inline-block;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    position: relative;
    animation: pulse-green 2s infinite;
}

.status-dot::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid #10b981;
    border-radius: 50%;
    opacity: 0.6;
    animation: ripple 2s infinite;
}

@keyframes pulse-green {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0.8);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}
