<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Shop Login</title>
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Roboto', sans-serif;
        }

        body {
            background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url("2.JPG") no-repeat center center fixed;
            background-size: cover;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
        }

        .login-container {
            width: 500px;
            padding: 40px 30px;
            background: red;
            border-radius: 14px;
            box-shadow: 0 15px 35px rgba(0,0,0,0.3);
            text-align: center;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .login-container:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 40px rgba(0,0,0,0.4);
        }

        .login-container h2 {
            margin-bottom: 25px;
            color: black;
            font-weight: 700;
            font-size: 28px;
        }

        .login-container input[type="text"],
        .login-container input[type="password"] {
            width: 100%;
            padding: 12px 15px;
            margin: 12px 0;
            border: 1px solid #bdc3c7;
            border-radius: 8px;
            font-size: 15px;
            transition: border 0.3s, box-shadow 0.3s;
        }

        .login-container input[type="text"]:focus,
        .login-container input[type="password"]:focus {
            border-color: #1abc9c;
            box-shadow: 0 0 10px rgba(26, 188, 156, 0.3);
            outline: none;
        }

        .login-container input[type="submit"] {
            width: 100%;
            padding: 14px;
            margin-top: 15px;
            background: green;
            border: none;
            color: white;
            font-size: 16px;
            font-weight: 500;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.3s ease, transform 0.2s ease;
        }

        .login-container input[type="submit"]:hover {
            background: #16a085;
            transform: translateY(-2px);
        }

        .error {
            color: #e74c3c;
            margin-top: 12px;
            font-size: 14px;
        }

        .footer {
            margin-top: 20px;
            font-size: 12px;
            color: black;
        }

        @media (max-width: 480px) {
            .login-container {
                width: 90%;
                padding: 30px 20px;
            }
        }
    </style>
</head>
<body>

<div class="login-container">
    <h2>Shop Login</h2>
    <form action="login.php" method="POST">
        <input type="text" name="username" placeholder="Username" required autofocus>
        <input type="password" name="password" placeholder="Password" required>
        <input type="submit" value="Login">
        <?php if(isset($_GET['error'])): ?>
            <div class="error"><?php echo htmlspecialchars($_GET['error']); ?></div>
        <?php endif; ?>
    </form>
    <div class="footer">
        &copy; 2025 Edigah Masai. All Rights Reserved.
    </div>
</div>

<?php include 'footer.php'; ?>
</body>
</html>
