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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    background-color: #f9f9f9;
    color: #333;
}

header {
    background-color: #4CAF50;
    color: white;
    padding: 1rem;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1rem;
}

main {
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.form-section {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-section h2 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: #4CAF50;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

input[type="text"],
input[type="url"],
input[type="file"] {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

input[type="text"]:focus,
input[type="url"]:focus,
input[type="file"]:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 4px rgba(76, 175, 80, 0.5);
}

button {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #45a049;
}
button.loading{
      background-color: #ccc; /* Greyed out */
       cursor: not-allowed;
}
button.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 10px;
    border: 2px solid white;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    transform: translateY(-50%);
}
@keyframes spin {
  0% { transform: translateY(-50%) rotate(0deg); }
  100% { transform: translateY(-50%) rotate(360deg); }
}

footer {
    text-align: center;
    margin-top: 2rem;
    color: #666;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .form-section {
        width: 100%;
        padding: 1.5rem;
    }

    .landing-page .content {
        padding: 1rem;
        text-align: center;
    }

    .landing-page .links a {
        display: block;
        margin: 0.5rem 0;
    }

    .publish-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }

    .form-section h2 {
        font-size: 1.25rem;
    }

    .landing-page .content h1 {
        font-size: 1.5rem;
    }
}

.short-url-container {
    margin-top: 20px;
    text-align: center;
}

.short-url-container p {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.short-url-container input[type="text"] {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 70%;
    margin-right: 10px;
}

.short-url-container button {
     display: inline-block;
     width: auto;
    padding: 10px 15px;
     background-color: #4CAF50;
     color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.short-url-container button:hover{
 background-color: #45a049;
}
.modal{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
    text-align: center;
}
.modal-content h2 {
    color: #4CAF50;
    margin-bottom: 10px;
}
.modal-content p {
   margin-bottom: 20px;
}
