* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 40px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    margin-bottom: 40px;
    border-radius: 0 0 20px 20px;
    position: relative;
}

header h1 {
    margin: 0;
    font-size: 28px;
    color: #2c3e50;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-area {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
}

.admin-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 50%;
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.admin-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    padding: 20px;
}

.link-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.05) 0%, 
        rgba(118, 75, 162, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.link-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.link-card:hover::before {
    opacity: 1;
}

.link-icon {
    margin-bottom: 15px;
    position: relative;
}

.link-icon img {
    width: 90px;
    height: 90px;
    border-radius: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.link-card:hover .link-icon img {
    transform: scale(1.1) rotate(3deg);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.link-info {
    position: relative;
}

.link-info p {
    color: #4a5568;
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
    transition: color 0.3s ease;
}

.link-card:hover .link-info p {
    color: #2d3748;
}

/* Thêm các màu gradient khác nhau cho các card */
.link-card:nth-child(4n+1)::before {
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.05) 0%, 
        rgba(118, 75, 162, 0.05) 100%);
}

.link-card:nth-child(4n+2)::before {
    background: linear-gradient(135deg, 
        rgba(250, 112, 154, 0.05) 0%, 
        rgba(254, 225, 64, 0.05) 100%);
}

.link-card:nth-child(4n+3)::before {
    background: linear-gradient(135deg, 
        rgba(67, 233, 123, 0.05) 0%, 
        rgba(56, 249, 215, 0.05) 100%);
}

.link-card:nth-child(4n+4)::before {
    background: linear-gradient(135deg, 
        rgba(255, 117, 140, 0.05) 0%, 
        rgba(255, 196, 140, 0.05) 100%);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header {
        padding: 15px 20px;
        margin-bottom: 20px;
    }

    header h1 {
        font-size: 24px;
    }

    .links-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
        padding: 10px;
    }

    .link-icon img {
        width: 70px;
        height: 70px;
    }

    .link-info p {
        font-size: 14px;
    }
}

/* Animation keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.link-card {
    animation: fadeIn 0.5s ease forwards;
    animation-delay: calc(var(--card-index) * 0.1s);
    opacity: 0;
}

/* Style cho nút xóa */
.delete-form {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.delete-button {
    width: 30px;
    height: 30px;
    border: none;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.delete-button:hover {
    background: #dc3545;
    transform: scale(1.1);
}

/* Style mới cho form login */
.login-form {
    max-width: 360px;
    margin: 80px auto;
    padding: 30px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.login-form h2 {
    text-align: center;
    color: #2c3e50;
    font-size: 24px;
    margin-bottom: 30px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #edf2f7;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.form-group input:focus {
    border-color: #667eea;
    background: #fff;
    outline: none;
}

.form-group input::placeholder {
    color: #a0aec0;
}

.login-button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-button:hover {
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.error {
    background: #fff5f5;
    color: #dc3545;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
}

/* Responsive cho form login */
@media (max-width: 480px) {
    .login-form {
        margin: 40px auto;
        padding: 20px;
    }
} 