/* Custom Styles for DevWorld */

/* Base Styles */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Custom Properties */
:root {
    --primary: #5e2bff;
    --secondary: #c04cfd;
    --accent1: #f7f6c5;
    --accent2: #f3fae1;
    --gradient-primary: linear-gradient(135deg, #5e2bff 0%, #c04cfd 100%);
    --gradient-secondary: linear-gradient(135deg, #c04cfd 0%, #5e2bff 100%);
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-large: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Navigation */
.nav-link {
    position: relative;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Section */
.hero-gradient {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(247, 246, 197, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(243, 250, 225, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 60% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
}

.hero-gradient > * {
    position: relative;
    z-index: 1;
}

/* Floating Elements Animation */
.floating-elements {
    position: relative;
    height: 200px;
    width: 100%;
    overflow: hidden;
}

.floating-icon {
    position: absolute;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.3);
    animation: float 6s ease-in-out infinite;
}

.floating-icon:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 6s;
}

.floating-icon:nth-child(2) {
    left: 25%;
    animation-delay: 1s;
    animation-duration: 7s;
}

.floating-icon:nth-child(3) {
    left: 45%;
    animation-delay: 2s;
    animation-duration: 8s;
}

.floating-icon:nth-child(4) {
    left: 65%;
    animation-delay: 3s;
    animation-duration: 6.5s;
}

.floating-icon:nth-child(5) {
    left: 80%;
    animation-delay: 4s;
    animation-duration: 7.5s;
}

.floating-icon:nth-child(6) {
    left: 90%;
    animation-delay: 5s;
    animation-duration: 8.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotateZ(0deg);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-20px) rotateZ(5deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-40px) rotateZ(-5deg);
        opacity: 0.8;
    }
    75% {
        transform: translateY(-20px) rotateZ(3deg);
        opacity: 0.6;
    }
}

/* Service Cards */
.service-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
}

.service-card:hover::before {
    left: 0;
}

/* Technology Items */
.tech-item {
    transition: all 0.3s ease;
    cursor: pointer;
}

.tech-item:hover {
    transform: translateY(-8px) scale(1.05);
}

/* Form Styles */
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    background: #fafafa;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(94, 43, 255, 0.1);
    outline: none;
}

/* Button Hover Effects */
button,
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

button:hover,
.btn:hover {
    transform: translateY(-2px);
}

/* Loading Animation */
.loading-text {
    display: inline-flex;
    align-items: center;
}

.loading-text::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Gradient Text */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-gradient h1 {
        font-size: 3rem;
    }
    
    .floating-elements {
        height: 100px;
    }
    
    .floating-icon {
        font-size: 1.5rem;
    }
    
    .service-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 640px) {
    .hero-gradient h1 {
        font-size: 2.5rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Animation Utilities */
.animate-bounce-slow {
    animation: bounce 2s infinite;
}

.animate-pulse-slow {
    animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Particle Background */
.particle-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: particle-float 10s linear infinite;
}

@keyframes particle-float {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

/* Focus Accessibility */
*:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .hero-gradient,
    nav,
    #contact,
    footer {
        display: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .service-card,
    .tech-item {
        border-width: 2px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .floating-icon {
        animation: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #ffffff;
        --bg-color: #1a1a1a;
        --card-bg: #2a2a2a;
    }
}

/* Custom Utilities */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.backdrop-blur-custom {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.border-gradient {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                var(--gradient-primary) border-box;
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-large);
}

/* Form Validation Styles */
input:invalid,
select:invalid,
textarea:invalid {
    border-color: #ef4444;
}

input:valid,
select:valid,
textarea:valid {
    border-color: #10b981;
}

/* Success/Error Messages */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    font-weight: 500;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}