/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(ellipse 800px 600px at 50% 0%, rgba(120, 119, 198, 0.15), transparent),
        radial-gradient(ellipse 600px 400px at 80% 100%, rgba(255, 119, 198, 0.15), transparent),
        radial-gradient(ellipse 1000px 800px at 0% 50%, rgba(120, 219, 226, 0.1), transparent),
        linear-gradient(135deg, #0c0b1d 0%, #1a1a2e 25%, #16213e 50%, #0f0c29 75%, #1a1a2e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* 3D Derinlik Katmanları */
.depth-layer-1 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 25% 25%, rgba(138, 43, 226, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 75% 75%, rgba(30, 144, 255, 0.06) 0%, transparent 40%);
    animation: depthFloat1 25s ease-in-out infinite;
    transform-style: preserve-3d;
    z-index: -3;
}

.depth-layer-2 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 60% 20%, rgba(255, 20, 147, 0.07) 0%, transparent 35%),
        radial-gradient(circle at 10% 80%, rgba(0, 191, 255, 0.05) 0%, transparent 35%);
    animation: depthFloat2 30s ease-in-out infinite reverse;
    transform-style: preserve-3d;
    z-index: -2;
}

.depth-layer-3 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 40% 60%, rgba(75, 0, 130, 0.06) 0%, transparent 30%),
        radial-gradient(circle at 90% 30%, rgba(25, 25, 112, 0.04) 0%, transparent 30%);
    animation: depthFloat3 35s ease-in-out infinite;
    transform-style: preserve-3d;
    z-index: -1;
}

/* Derinlik animasyonları */
@keyframes depthFloat1 {
    0%, 100% {
        transform: translateZ(0) rotateX(0deg) rotateY(0deg) scale(1);
        filter: blur(0px) brightness(1);
    }
    25% {
        transform: translateZ(20px) rotateX(2deg) rotateY(1deg) scale(1.02);
        filter: blur(1px) brightness(1.1);
    }
    50% {
        transform: translateZ(10px) rotateX(-1deg) rotateY(-2deg) scale(0.98);
        filter: blur(0.5px) brightness(0.9);
    }
    75% {
        transform: translateZ(15px) rotateX(1deg) rotateY(2deg) scale(1.01);
        filter: blur(0.8px) brightness(1.05);
    }
}

@keyframes depthFloat2 {
    0%, 100% {
        transform: translateZ(0) rotateX(0deg) rotateY(0deg) scale(1);
        filter: blur(0px) brightness(1);
    }
    33% {
        transform: translateZ(-15px) rotateX(-1deg) rotateY(2deg) scale(0.99);
        filter: blur(0.8px) brightness(0.95);
    }
    66% {
        transform: translateZ(25px) rotateX(2deg) rotateY(-1deg) scale(1.03);
        filter: blur(1.2px) brightness(1.1);
    }
}

@keyframes depthFloat3 {
    0%, 100% {
        transform: translateZ(0) rotateX(0deg) rotateY(0deg) scale(1);
        filter: blur(0px) brightness(1);
    }
    20% {
        transform: translateZ(10px) rotateX(1deg) rotateY(-1deg) scale(1.01);
        filter: blur(0.5px) brightness(1.02);
    }
    40% {
        transform: translateZ(-20px) rotateX(-2deg) rotateY(1deg) scale(0.97);
        filter: blur(1px) brightness(0.98);
    }
    60% {
        transform: translateZ(30px) rotateX(1.5deg) rotateY(2deg) scale(1.04);
        filter: blur(1.5px) brightness(1.08);
    }
    80% {
        transform: translateZ(-10px) rotateX(-1deg) rotateY(-1deg) scale(0.99);
        filter: blur(0.7px) brightness(0.97);
    }
}

/* Partikül efektleri */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -4;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: particleFloat 20s linear infinite;
}

.particle:nth-child(1) { width: 4px; height: 4px; top: 10%; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { width: 6px; height: 6px; top: 20%; left: 80%; animation-delay: 2s; }
.particle:nth-child(3) { width: 3px; height: 3px; top: 60%; left: 20%; animation-delay: 4s; }
.particle:nth-child(4) { width: 5px; height: 5px; top: 80%; left: 70%; animation-delay: 6s; }
.particle:nth-child(5) { width: 4px; height: 4px; top: 40%; left: 90%; animation-delay: 8s; }
.particle:nth-child(6) { width: 7px; height: 7px; top: 70%; left: 40%; animation-delay: 10s; }
.particle:nth-child(7) { width: 3px; height: 3px; top: 30%; left: 60%; animation-delay: 12s; }
.particle:nth-child(8) { width: 5px; height: 5px; top: 90%; left: 30%; animation-delay: 14s; }

@keyframes particleFloat {
    0% {
        transform: translateY(0px) translateX(0px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

/* Işık huzmeleri */
.light-rays {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.03) 45%, rgba(255, 255, 255, 0.01) 50%, transparent 55%),
        linear-gradient(-45deg, transparent 40%, rgba(138, 43, 226, 0.02) 45%, rgba(30, 144, 255, 0.01) 50%, transparent 55%);
    animation: lightSweep 15s ease-in-out infinite;
    pointer-events: none;
    z-index: -5;
}

@keyframes lightSweep {
    0%, 100% {
        transform: translateX(-100%) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: translateX(100%) rotate(180deg);
        opacity: 0.6;
    }
}

@keyframes backgroundShift {
    0% { background: linear-gradient(135deg, #0c0b1d 0%, #1a1a2e 25%, #16213e 50%, #0f0c29 75%, #1a1a2e 100%); }
    25% { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 25%, #0f0c29 50%, #1a1a2e 75%, #0c0b1d 100%); }
    50% { background: linear-gradient(135deg, #16213e 0%, #0f0c29 25%, #1a1a2e 50%, #0c0b1d 75%, #16213e 100%); }
    75% { background: linear-gradient(135deg, #0f0c29 0%, #1a1a2e 25%, #0c0b1d 50%, #16213e 75%, #0f0c29 100%); }
    100% { background: linear-gradient(135deg, #0c0b1d 0%, #1a1a2e 25%, #16213e 50%, #0f0c29 75%, #1a1a2e 100%); }
}

/* Login container */
.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease-out;
}


@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo container */
.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.app-logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 2rem;
    font-weight: 600;
}

/* Input groups */
.input-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 3px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

/* Select wrapper for searchable dropdown */
.select-wrapper {
    position: relative;
}

#company {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
}

#company:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: rgba(255, 255, 255, 1);
}

.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
    margin-top: 2px;
    cursor: pointer;
}

.dropdown-item {
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.dropdown-item.selected {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: rgba(255, 255, 255, 1);
}

/* Login button */
.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.login-btn:active {
    transform: translateY(0);
}

/* Message display */
#message {
    margin-top: 20px;
    text-align: center;
    font-weight: 500;
}

/* Responsive design */
@media (max-width: 768px) {
    .login-container {
        padding: 15px;
        max-width: 100%;
    }

    .login-form {
        padding: 20px 15px;
        max-width: 100%;
        margin: 0 auto;
    }

    .app-logo {
        width: 50px;
        height: 50px;
    }

    h1 {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }

    .input-group {
        margin-bottom: 15px;
    }

    input[type="text"],
    input[type="password"],
    #company {
        padding: 10px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .login-btn {
        padding: 12px;
        font-size: 16px;
        margin-top: 15px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 10px;
    }

    .login-form {
        padding: 20px 15px;
    }

    .app-logo {
        width: 50px;
        height: 50px;
    }

    h1 {
        font-size: 1.5rem;
    }

    input[type="text"],
    input[type="password"],
    input[type="email"],
    .login-btn {
        padding: 10px;
    }
}

/* Floating Settings Button */
.floating-settings-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-settings-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.floating-settings-btn:active {
    transform: scale(0.95);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    margin: 15% auto;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 400px;
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #333;
}

.modal h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
}

.delete-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #ff4757 0%, #ff3838 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.delete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 71, 87, 0.3);
    background: linear-gradient(135deg, #ff3838 0%, #ff2828 100%);
}

.delete-btn:active {
    transform: translateY(0);
}

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

/* PWA specific styles */
@media all and (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}