/* Sumal Osiant Design System */
:root {
    --sumal-primary: #6366f1;
    --sumal-primary-dark: #4f46e5;
    --sumal-secondary: #10b981;
    --sumal-warning: #f59e0b;
    --sumal-danger: #ef4444;
    --sumal-dark: #1e293b;
    --sumal-light: #f8fafc;
    --sumal-gray: #64748b;
    --sumal-border: #e2e8f0;
    --sumal-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
    --sumal-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

@font-face {
    font-family: 'SumalFont';
    src: url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--sumal-light);
    color: var(--sumal-dark);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Floating Background */
.sumal-bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.sumal-particle {
    position: absolute;
    border-radius: 50%;
    background: var(--sumal-gradient);
    opacity: 0.1;
    animation: float-particle 20s infinite linear;
}

@keyframes float-particle {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-100vh) rotate(360deg); }
}

/* Logo Animation */
.sumal-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.8rem;
    background: var(--sumal-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: logo-glow 3s ease-in-out infinite;
}

@keyframes logo-glow {
    0%, 100% { filter: drop-shadow(0 0 5px rgba(99, 102, 241, 0.3)); }
    50% { filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.6)); }
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    padding: 12px 0;
    display: flex;
    justify-content: space-around;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--sumal-gray);
    font-size: 0.8rem;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 12px;
}

.nav-item.active {
    color: var(--sumal-primary);
    background: rgba(99, 102, 241, 0.1);
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

/* Cards with Animation */
.sumal-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--sumal-shadow);
    margin-bottom: 20px;
    border: 1px solid var(--sumal-border);
    animation: card-float 6s ease-in-out infinite;
}

@keyframes card-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Form Elements */
.sumal-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--sumal-border);
    border-radius: 14px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.sumal-input:focus {
    outline: none;
    border-color: var(--sumal-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.sumal-btn {
    background: var(--sumal-gradient);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.sumal-btn:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.sumal-btn:hover:before {
    width: 300px;
    height: 300px;
}

.sumal-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

/* Result Display */
.result-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 18px;
    background: var(--sumal-light);
    border-radius: 16px;
    margin-bottom: 12px;
    border-left: 4px solid var(--sumal-primary);
    animation: slide-in 0.4s ease-out;
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.result-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--sumal-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.result-content {
    flex: 1;
}

.result-label {
    font-size: 0.9rem;
    color: var(--sumal-gray);
    margin-bottom: 4px;
    display: block;
}

.result-value {
    font-size: 1.1rem;
    color: var(--sumal-dark);
    font-weight: 500;
    line-height: 1.4;
}

/* Loading Animation */
.sumal-loader {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    border-top-color: var(--sumal-primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success/Error Animations */
.sumal-alert {
    padding: 16px;
    border-radius: 14px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: alert-pop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes alert-pop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-only { display: block !important; }
    .desktop-only { display: none !important; }
    
    .sumal-card {
        padding: 20px;
        margin: 0 16px 20px;
        border-radius: 18px;
    }
    
    .sumal-btn {
        width: 100%;
        padding: 18px;
    }
    
    .nav-item span {
        font-size: 0.75rem;
    }
}

@media (min-width: 769px) {
    .mobile-only { display: none !important; }
    .desktop-only { display: block !important; }
    
    .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 24px;
    }
}

/* Print Styles */
@media print {
    .mobile-nav, .sumal-btn, .no-print {
        display: none !important;
    }
    
    .sumal-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Footer Copyright */
.sumal-footer {
    text-align: center;
    padding: 30px 0;
    color: var(--sumal-gray);
    font-size: 0.9rem;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--sumal-border);
}

.copyright {
    margin-bottom: 10px;
}

.developer {
    font-size: 0.8rem;
    opacity: 0.7;
}

.developer span {
    color: var(--sumal-primary);
    font-weight: 600;
}