* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-image: url('https://6710i.ir/bg/uploads/1751578102_6866f5f6c3d76.png');
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 2.8rem;
    margin-bottom: 12px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    font-weight: 700;
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

/* Login Form Styles */
.login-container {
    background: rgba(79, 79, 79, 0.95);
    border-radius: 25px;
    padding: 50px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    max-width: 450px;
    margin: 0 auto;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.2);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 35px;
    color: #ffffff;
    font-size: 2rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #c3c1c1;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #565656;
    color: #ffffff;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    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;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e1e5e9;
}

.btn-secondary:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(220, 53, 69, 0.4);
}

/* Admin Panel Styles */
.admin-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    margin-bottom: 30px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.2);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 3px solid #f1f3f4;
}

.admin-header h2 {
    color: #333;
    font-size: 2rem;
    font-weight: 600;
}

.add-link-form {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 20px;
    margin-bottom: 40px;
    align-items: end;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    border: 2px solid #e9ecef;
}

.add-link-form input {
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    background: white;
    transition: all 0.3s ease;
}

.add-link-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.add-link-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.link-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    padding: 25px;
    border: 2px solid #e9ecef;
    transition: all 0.4s ease;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.link-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.link-text {
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    word-wrap: break-word;
    font-size: 1.1rem;
    line-height: 1.4;
}

.link-url {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    word-break: break-all;
    background: #f1f3f4;
    padding: 8px 12px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
}

.link-actions {
    display: flex;
    gap: 12px;
}

.btn-small {
    padding: 10px 18px;
    font-size: 14px;
}

/* Public View Styles */
.public-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 40px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
}

.public-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.link-button {
    background-color: #ff9100;
    color: white;
    padding: 30px 35px;
    border-radius: 2500px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.5;
    word-wrap: break-word;
    hyphens: auto;
    min-height: 120px;
    transition: all 0.4s ease;
    box-shadow: 0px 0px 10px #ff7b00;
    position: relative;
    overflow: hidden;
}

.link-button::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.6s;
}

.link-button:hover::before {
    left: 100%;
}

.link-button:hover {
    transform: translateY(-8px) scale(1.03);
    background-color: #d17070;
}

.admin-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border: none;
    border-radius: 50px;
    padding: 18px 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.3);
}

.admin-toggle:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    background: rgba(255, 255, 255, 1);
}

.hidden {
    display: none !important;
}

.error {
    color: #dc3545;
    font-size: 14px;
    margin-top: 15px;
    text-align: center;
    font-weight: 500;
}

.success {
    color: #28a745;
    font-size: 14px;
    margin-top: 15px;
    text-align: center;
    font-weight: 500;
}

.empty-state {
    text-align: center;
    color: rgba(255,255,255,0.8);
    font-size: 1.3rem;
    grid-column: 1 / -1;
    padding: 60px 40px;
}

.empty-state-admin {
    text-align: center;
    color: #666;
    font-size: 1.2rem;
    grid-column: 1 / -1;
    padding: 50px 40px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px dashed #dee2e6;
}

.stats-bar {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    text-align: center;
    border: 2px solid #e1e5e9;
}

.stats-bar span {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .add-link-form {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .public-links {
        grid-template-columns: 1fr;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }

    .container {
        padding: 15px;
    }

    .login-container, .admin-panel {
        padding: 30px 25px;
    }

    .header h1 {
        font-size: 2.2rem;
    }
}
