/* Import Inter font for better typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Override body background for dark theme */
body {
    background: #000000;
    color: #ffffff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, sans-serif;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

/* Update top nav for dark theme */
.top-nav {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.menu-bar {
    background: #ffffff;
}

.page-title {
    background: linear-gradient(90deg, #0052FF, #0041CC);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Main container */
.deploy-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 24px;
}

.deploy-header {
    text-align: center;
    margin-bottom: 56px;
}

.deploy-header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, #0052FF, #0041CC);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.deploy-header p {
    font-size: 1.125rem;
    color: #9CA3AF;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 400;
}

/* Form container */
.deploy-form-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 48px;
    backdrop-filter: blur(20px);
}

.form-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 48px;
    align-items: start;
}

/* Left side - Image upload */
.image-upload-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-upload-area {
    width: 280px;
    height: 280px;
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.01);
    position: relative;
    overflow: hidden;
}

.image-upload-area:hover {
    border-color: rgba(0, 82, 255, 0.3);
    background: rgba(0, 82, 255, 0.02);
}

.image-upload-area.has-image {
    border-color: #0052FF;
    background: transparent;
}

.upload-placeholder {
    text-align: center;
    color: #6B7280;
}

.upload-placeholder .icon {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
    opacity: 0.6;
}

.upload-placeholder div {
    font-size: 0.875rem;
    line-height: 1.4;
    font-weight: 500;
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.upload-info {
    margin-top: 16px;
    text-align: center;
    font-size: 0.875rem;
    color: #6B7280;
    font-weight: 500;
}

#imageInput {
    display: none;
}

/* Right side - Form fields */
.form-fields {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    letter-spacing: -0.01em;
}

.required {
    color: #EF4444;
}

.form-input, .form-textarea, .form-select {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.9375rem;
    color: #ffffff;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    line-height: 1.5;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: #0052FF;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.1);
}

.form-input::placeholder, .form-textarea::placeholder {
    color: #6B7280;
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

/* Info icon and tooltip styles */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #9CA3AF;
    font-size: 11px;
    cursor: help;
    transition: all 0.2s ease;
    position: relative;
    margin-left: 4px;
}

.info-icon:hover {
    background: rgba(0, 82, 255, 0.2);
    color: #0052FF;
}

.tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.95);
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.4;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    white-space: nowrap;
    max-width: 320px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.95);
}

.info-icon:hover .tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-2px);
}

.tooltip-wide {
    white-space: normal;
    width: 280px;
    max-width: 280px;
}

/* Telegram notification section */
.telegram-notification-section {
    background: rgba(0, 135, 255, 0.05);
    border: 1px solid rgba(0, 135, 255, 0.15);
    border-radius: 12px;
    padding: 20px;
    margin-top: 8px;
}

.telegram-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.telegram-icon {
    font-size: 1.125rem;
    color: #0087FF;
}

.telegram-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #ffffff;
}

.telegram-setup-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.setup-step {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: #D1D5DB;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0087FF;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 1px;
}

.bot-command {
    background: rgba(0, 0, 0, 0.3);
    color: #FFD700;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.75rem;
}

/* Extra options toggle */
.extra-options-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    cursor: pointer;
    user-select: none;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-switch.active {
    background: #0052FF;
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-switch.active .toggle-slider {
    transform: translateX(20px);
}

.extra-options-toggle label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #E5E7EB;
    cursor: pointer;
}

.extra-options {
    display: none;
    grid-column: 1 / -1;
}

.extra-options.visible {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 8px;
}

/* Deploy button */
.deploy-button-container {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.deploy-btn {
    background: #0052FF;
    color: #ffffff;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 180px;
    justify-content: center;
    font-family: inherit;
    letter-spacing: -0.01em;
}

.deploy-btn:hover:not(:disabled) {
    background: #0041CC;
    transform: translateY(-1px);
}

.deploy-btn:active:not(:disabled) {
    transform: translateY(0);
}

.deploy-btn:disabled {
    background: rgba(255, 255, 255, 0.08);
    color: #6B7280;
    cursor: not-allowed;
    transform: none;
}

.deploy-btn.connect-wallet {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.deploy-btn.connect-wallet:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Loading spinner */
.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive design */
@media (max-width: 1024px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .image-upload-section {
        order: -1;
    }

    .deploy-container {
        margin: 40px auto;
    }
}

@media (max-width: 768px) {
    .deploy-container {
        padding: 0 20px;
        margin: 24px auto;
    }

    .deploy-form-container {
        padding: 32px 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .deploy-header h1 {
        font-size: 2.75rem;
    }

    .deploy-header {
        margin-bottom: 40px;
    }

    .image-upload-area {
        width: 240px;
        height: 240px;
    }

    .tooltip {
        position: fixed;
        left: 20px !important;
        right: 20px !important;
        width: auto !important;
        max-width: none !important;
        transform: none !important;
    }
}

@media (max-width: 480px) {
    .deploy-header h1 {
        font-size: 2.25rem;
    }

    .deploy-form-container {
        padding: 24px 16px;
    }

    .deploy-container {
        padding: 0 16px;
    }

    .form-grid {
        gap: 32px;
    }

    .image-upload-area {
        width: 200px;
        height: 200px;
    }
}

/* Deployment Overlay Styles - Add to deploy.css */

/* Deployment overlay backdrop */
.deployment-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.deployment-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Main deployment modal */
.deployment-modal {
    background: linear-gradient(135deg, rgba(0, 82, 255, 0.1), rgba(0, 65, 204, 0.05));
    border: 1px solid rgba(0, 82, 255, 0.2);
    border-radius: 20px;
    padding: 48px 40px;
    text-align: center;
    max-width: 480px;
    width: 90%;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.deployment-overlay.active .deployment-modal {
    transform: translateY(0) scale(1);
}

/* Animated deployment icon */
.deployment-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.deployment-icon .rocket {
    font-size: 3rem;
    animation: rocketFloat 2s ease-in-out infinite;
}

@keyframes rocketFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(2deg); }
}

/* Pulsing ring around icon */
.deployment-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    border: 2px solid rgba(0, 82, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 2s ease-in-out infinite;
}

.deployment-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    border: 1px solid rgba(0, 82, 255, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 2s ease-in-out infinite 0.5s;
}

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

/* Status text styling */
.deployment-status {
    margin-bottom: 16px;
}

.deployment-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.deployment-message {
    font-size: 1rem;
    color: #D1D5DB;
    line-height: 1.5;
    margin-bottom: 24px;
}

/* Transaction details */
.transaction-details {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.transaction-hash {
    font-size: 0.875rem;
    color: #9CA3AF;
    margin-bottom: 8px;
}

.hash-value {
    font-family: 'Monaco', 'Menlo', monospace;
    color: #0052FF;
    word-break: break-all;
    font-size: 0.8125rem;
}

/* Progress indicators */
.deployment-progress {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.progress-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    color: #9CA3AF;
    transition: color 0.2s ease;
}

.progress-item.active {
    color: #0052FF;
}

.progress-item.completed {
    color: #10B981;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(156, 163, 175, 0.5);
    transition: all 0.2s ease;
}

.progress-item.active .progress-dot {
    background: #0052FF;
    animation: progressPulse 1.5s ease-in-out infinite;
}

.progress-item.completed .progress-dot {
    background: #10B981;
}

@keyframes progressPulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.3);
        opacity: 0.7;
    }
}

/* Timer display */
.deployment-timer {
    font-size: 0.875rem;
    color: #6B7280;
    font-weight: 500;
    margin-top: 16px;
    font-family: 'Monaco', 'Menlo', monospace;
}

/* Success state styles */
.deployment-modal.success {
    border-color: rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
}

.deployment-modal.success .deployment-icon .rocket {
    animation: successBounce 0.6s ease-out;
}

@keyframes successBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Error state styles */
.deployment-modal.error {
    border-color: rgba(239, 68, 68, 0.3);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
}

/* Page dimming effect */
body.deployment-active .deploy-container {
    opacity: 0.3;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

body.deployment-active .top-nav {
    opacity: 0.3;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .deployment-modal {
        padding: 40px 24px;
        border-radius: 16px;
    }
    
    .deployment-title {
        font-size: 1.25rem;
    }
    
    .deployment-icon {
        width: 64px;
        height: 64px;
        margin-bottom: 20px;
    }
    
    .deployment-icon .rocket {
        font-size: 2.5rem;
    }
    
    .deployment-icon::before {
        width: 80px;
        height: 80px;
    }
    
    .deployment-icon::after {
        width: 96px;
        height: 96px;
    }
}

@media (max-width: 480px) {
    .deployment-modal {
        padding: 32px 20px;
        width: 95%;
    }
}
