/* style.css - Beautiful White & Blue Theme for Link Shortener */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(145deg, #e6f0ff 0%, #ffffff 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Beautiful background pattern */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.03) 0%, transparent 30%),
                radial-gradient(circle at 90% 80%, rgba(37, 99, 235, 0.03) 0%, transparent 30%),
                radial-gradient(circle at 30% 50%, rgba(37, 99, 235, 0.02) 0%, transparent 40%);
    pointer-events: none;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 98, 255, 0.25),
                0 0 0 1px rgba(255, 255, 255, 0.5) inset,
                0 0 0 2px rgba(37, 99, 235, 0.1);
    padding: 45px;
    max-width: 650px;
    width: 100%;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -12px rgba(0, 98, 255, 0.35),
                0 0 0 1px rgba(255, 255, 255, 0.6) inset,
                0 0 0 2px rgba(37, 99, 235, 0.2);
}

h1 {
    color: #1e293b;
    margin-bottom: 10px;
    font-size: 2.8em;
    text-align: center;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #1e293b 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
    width: 100%;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 3px;
}

.subtitle {
    color: #475569;
    text-align: center;
    margin-bottom: 35px;
    font-size: 1.15em;
    font-weight: 400;
    line-height: 1.6;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

.input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    position: relative;
}

input[type="url"],
input[type="text"],
input[type="password"] {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    color: #1e293b;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

input[type="url"]:focus,
input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

input[type="url"]::placeholder,
input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: #94a3b8;
    font-weight: 300;
}

.btn {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.3);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(37, 99, 235, 0.4);
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 5px 15px -5px rgba(37, 99, 235, 0.4);
}

/* Loading spinner */
.loading-container {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 20px;
    margin-top: 20px;
}

.spinner {
    border: 4px solid rgba(37, 99, 235, 0.1);
    border-top: 4px solid #2563eb;
    border-right: 4px solid #3b82f6;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-container p {
    color: #2563eb;
    font-weight: 500;
    font-size: 1.1em;
}

/* Result container */
.result-container {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 20px;
    animation: slideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid rgba(37, 99, 235, 0.1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.result-container p {
    color: #1e293b;
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-container p::before {
    content: '✨';
    font-size: 1.2em;
}

.short-link-container {
    display: flex;
    gap: 12px;
    margin: 20px 0;
}

.short-link-container input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 15px;
    background: white;
    color: #2563eb;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.copy-btn {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 15px -5px rgba(5, 150, 105, 0.3);
    position: relative;
    overflow: hidden;
}

.copy-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.copy-btn:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -5px rgba(5, 150, 105, 0.4);
}

.copy-btn:hover::before {
    left: 100%;
}

.copy-btn:active {
    transform: translateY(0);
}

.small-text {
    font-size: 13px;
    color: #64748b;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.small-text::before {
    content: '📋';
    font-size: 14px;
}

/* Error container */
.error-container {
    margin-top: 25px;
    padding: 18px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-radius: 16px;
    text-align: center;
    font-weight: 500;
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
    border: 1px solid rgba(185, 28, 28, 0.2);
    box-shadow: 0 8px 15px -5px rgba(185, 28, 28, 0.2);
    font-size: 0.95em;
}

@keyframes shake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px); }
}

/* Login specific styles */
.login-container {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-form {
    margin-top: 30px;
}

.login-form .input-group {
    margin-bottom: 20px;
}

.login-form input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.login-form input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.btn-login {
    width: 100%;
    margin-top: 15px;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    padding: 16px;
    font-size: 17px;
    letter-spacing: 0.5px;
}

.login-info {
    margin-top: 35px;
    padding: 25px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 20px;
    text-align: left;
    border: 1px solid rgba(37, 99, 235, 0.1);
    position: relative;
    overflow: hidden;
}

.login-info::before {
    content: '🔐';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    opacity: 0.2;
}

.login-info p {
    margin: 8px 0;
    color: #475569;
    font-size: 0.95em;
}

.login-info strong {
    color: #2563eb;
    font-size: 1.1em;
}

.login-info code {
    background: white;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 14px;
    color: #2563eb;
    font-weight: 600;
    border: 1px solid rgba(37, 99, 235, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

/* Header styles for logged-in users */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(37, 99, 235, 0.1);
    position: relative;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 2px;
}

.header h1 {
    margin: 0;
    font-size: 2.2em;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(37, 99, 235, 0.05);
    padding: 8px 15px 8px 20px;
    border-radius: 40px;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.user-info span {
    color: #2563eb;
    font-weight: 500;
    font-size: 0.95em;
}

.logout-btn {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    color: white;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 12px -5px rgba(225, 29, 72, 0.4);
    letter-spacing: 0.3px;
}

.logout-btn:hover {
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -5px rgba(225, 29, 72, 0.5);
}

.logout-btn:active {
    transform: translateY(0);
}

/* Main container for logged-in content */
.main-container {
    animation: slideIn 0.5s ease;
}

/* Beautiful decorative elements */
.container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.05));
    border-radius: 40px;
    z-index: -1;
    filter: blur(20px);
}

/* Responsive design */
@media (max-width: 600px) {
    .container {
        padding: 30px 20px;
    }
    
    h1 {
        font-size: 2.2em;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .header::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .user-info {
        flex-direction: column;
        width: 100%;
        padding: 12px;
        border-radius: 20px;
    }
    
    .login-info {
        text-align: center;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .short-link-container {
        flex-direction: column;
    }
    
    .copy-btn {
        width: 100%;
    }
    
    .login-info::before {
        display: none;
    }
}

/* Glass morphism effects for modern look */
.glass-effect {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
}

/* Additional hover effects */
.input-group:hover input {
    border-color: #94a3b8;
}

.input-group:focus-within:hover input {
    border-color: #2563eb;
}

/* Success message styling */
.success-message {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    padding: 15px;
    border-radius: 16px;
    border: 1px solid rgba(5, 150, 105, 0.2);
    margin-top: 20px;
    text-align: center;
    font-weight: 500;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}