:root {
    --primary: #000000;
    --secondary: #ffffff;
    --accent: #ff4d4d;
    --bg: #f9f9f9;
    --text: #333333;
    --text-light: #777777;
    --border: 2px solid var(--primary);
    --border-radius: 0;
    --shadow: 6px 6px 0 var(--primary);
    --transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Space Grotesk', 'Helvetica Neue', sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.container {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    background: var(--secondary);
    border: var(--border);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.container::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 25%;
    height: 100%;
    background: repeating-linear-gradient(45deg, var(--primary), var(--primary) 8px, var(--secondary) 8px, var(--secondary) 16px);
    opacity: 0.05;
    z-index: 0;
}

h1 {
    font-size: clamp(1.8rem, 5vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: clamp(0.9rem, 3vw, 1rem);
    position: relative;
    z-index: 1;
}

.input-group {
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 1;
}

#guestName {
    text-transform: capitalize;
  }
  
#guestName::placeholder {
    text-transform: none;
  }

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

input[type="text"] {
    width: 100%;
    padding: 0.8rem;
    border: var(--border);
    font-size: clamp(0.9rem, 3vw, 0.95rem);
    transition: var(--transition);
    background-color: transparent;
}

.result-container {
    margin-top: 1.5rem;
    position: relative;
    z-index: 1;
}

.result-row {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

textarea {
    width: 100%;
    padding: 1rem;
    border: var(--border);
    font-size: clamp(0.9rem, 3vw, 0.95rem);
    resize: none;
    min-height: 150px;
    transition: var(--transition);
}

#generatedUrl {
    width: 100%;
    padding: 0.8rem;
    border: var(--border);
    font-size: clamp(0.85rem, 3vw, 0.9rem);
    background-color: var(--secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-btn {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--secondary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.copy-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    pointer-events: none;
}

.error-message,
.success-message {
    margin-top: 0.75rem;
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
    border: var(--border);
    display: block;
    height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    border-width: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
}

.error-message.active,
.success-message.active {
    height: auto;
    opacity: 1;
    border-width: 2px;
    padding: 0.6rem 0.8rem;
    margin-top: 0.75rem;
}

.error-message {
    background-color: var(--secondary);
    color: var(--accent);
    border-color: var(--accent);
}

.success-message {
    background-color: var(--secondary);
    color: var(--primary);
    border-color: var(--primary);
}

input[type="text"]:focus,
textarea:focus,
#generatedUrl:focus {
    outline: none;
    box-shadow: 3px 3px 0 var(--primary);
    transform: translate(-2px, -2px);
}

.copy-btn:hover,
.copy-btn:focus {
    background: var(--accent);
    transform: translate(-2px, -2px);
    box-shadow: 3px 3px 0 var(--primary);
}

.copy-btn:active {
    transform: translate(0, 0);
    box-shadow: none;
}

@media (max-width: 600px) {
    .container {
        padding: 1.5rem;
    }

    .result-row {
        flex-direction: column;
    }

    .copy-btn {
        width: 100%;
        height: 45px;
        margin-top: 0.5rem;
    }

    textarea {
        padding: 0.7rem;
    }

    #generatedUrl {
        padding: 0.7rem;
    }
}

@media (max-width: 375px) {
    .container {
        padding: 1.25rem;
    }

    h1 {
        font-size: 1.6rem;
    }

    .copy-btn svg {
        width: 18px;
        height: 18px;
    }
}