@font-face {
    font-family: 'Charles Wright Bold';
    font-style: normal;
    font-weight: normal;
    src: local('Charles Wright Bold'), url('../fonts/CharlesWright-Bold.woff') format('woff');
    font-display: swap;
}

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

html {
    /* Prevent iOS Safari from adjusting viewport */
    height: 100%;
}

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    background-size: cover;
    background-repeat: no-repeat;
    /* Fix for iOS Safari viewport issues */
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 650px;
}

.plate-container {
    background: #FFD900;
    border: 4px solid #000;
    border-radius: 6px;
    box-shadow:
            0 8px 20px rgba(0, 0, 0, 0.3),
            inset 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: stretch;
    padding: 0;
    margin-bottom: 20px;
    overflow: hidden;
    min-height: 90px;
}

/* UK Flag and GB Section */
.uk-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #003399;
    padding: 10px 8px;
    border-right: 2px solid #000;
    min-width: 50px;
    flex-shrink: 0;
}

.uk-flag {
    width: 32px;
    height: 24px;
    position: relative;
    background: #003399;
    margin-bottom: 4px;
}

/* Union Jack flag styling */
.uk-flag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
            linear-gradient(to bottom, transparent 40%, white 40%, white 60%, transparent 60%),
            linear-gradient(to right, transparent 40%, white 40%, white 60%, transparent 60%);
}

.uk-flag::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
            linear-gradient(to bottom, transparent 45%, #C8102E 45%, #C8102E 55%, transparent 55%),
            linear-gradient(to right, transparent 45%, #C8102E 45%, #C8102E 55%, transparent 55%),
            linear-gradient(45deg, transparent 48%, white 48%, white 52%, transparent 52%),
            linear-gradient(-45deg, transparent 48%, white 48%, white 52%, transparent 52%);
}

.gb-text {
    color: white;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

/* Input section */
.input-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 25px;
    background: #FFD900;
}

.plate-input {
    background: transparent;
    border: none;
    font-size: clamp(32px, 6vw, 56px);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 8px;
    padding: 0;
    outline: none;
    color: #000;
    font-family: 'Charles Wright Bold', 'Trebuchet MS', 'Arial Narrow', Arial, sans-serif;
    text-align: center;
    width: 100%;
    -webkit-text-stroke: 0.5px #000;
}

.plate-input::placeholder {
    color: #666;
    opacity: 0.5;
}

/* Search button */
.search-button {
    background: #003399;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    width: 100%;
}

.search-button:hover {
    background: #0044bb;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.search-button:active {
    transform: translateY(0);
}

/* Info text */
.info-text {
    text-align: center;
    color: white;
    margin-top: 20px;
    font-size: 14px;
    opacity: 0.9;
}

.info-text a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.info-text a:hover {
    opacity: 0.7;
}

.footer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #667eea;
    font-size: 14px;
    background: white;
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Announcement Banner */
.announcement {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 15px 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.announcement.good-news {
    background: #10b981;
    color: white;
}

.announcement.bad-news {
    background: #ef4444;
    color: white;
}

.announcement-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.announcement-message {
    font-size: 13px;
    opacity: 0.95;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .plate-container {
        min-height: 70px;
    }

    .uk-section {
        min-width: 42px;
        padding: 8px 6px;
    }

    .uk-flag {
        width: 28px;
        height: 20px;
    }

    .gb-text {
        font-size: 9px;
    }

    .input-section {
        padding: 15px 18px;
    }

    .plate-input {
        letter-spacing: 6px;
    }

    .search-button {
        padding: 12px 20px;
        font-size: 16px;
    }
}

@media (max-width: 380px) {
    .plate-container {
        min-height: 60px;
    }

    .input-section {
        padding: 12px 15px;
    }

    .plate-input {
        letter-spacing: 4px;
    }

    .uk-section {
        min-width: 36px;
    }
}
