/* TT Norms font - локальный файл */
@font-face {
    font-family: 'TT Norms';
    src: url('../fonts/TTNorms-Medium.otf') format('opentype');
    font-weight: 400; /* Используем как основной weight */
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'TT Norms';
    src: url('../fonts/TTNorms-Medium.otf') format('opentype');
    font-weight: 500; /* Medium weight */
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'TT Norms';
    src: url('../fonts/TTNorms-Medium.otf') format('opentype');
    font-weight: 600; /* Используем Medium для SemiBold */
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'TT Norms';
    src: url('../fonts/TTNorms-Bold.otf') format('opentype');
    font-weight: 700; /* Bold weight */
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'TT Norms';
    src: url('../fonts/TTNorms-Bold.otf') format('opentype');
    font-weight: 900; /* Extra Bold weight */
    font-style: normal;
    font-display: swap;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'TT Norms', 'Arial', sans-serif;
    background: linear-gradient(to bottom, #ffffff 0%, #e0f0ff 25%, #b3d9ff 60%, #4da6ff 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Login Page Styles */
#loginForm {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#loginForm h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
}

.input-group input[type="text"],
.input-group input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-family: 'TT Norms', sans-serif;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

#loginForm .btn {
    background-color: #007bff;
    color: white;
    width: 100%;
    margin-top: 10px;
}

#loginForm .btn:hover {
    background-color: #0056b3;
}

.error-message {
    color: red;
    text-align: center;
    margin-top: 10px;
    font-size: 0.9em;
}

/* Garage Container */
.garage-container {
    width: calc(100% - 80px);
    min-height: calc(100vh - 80px);
    margin: 40px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Header */
.garage-header {
    background: transparent;
    border-radius: 20px;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.garage-title {
    font-size: 3.75em;
    color: #2c3e50;
    font-weight: bold;
    text-shadow: 2px 2px 8px rgba(255, 255, 255, 0.8);
    letter-spacing: 3px;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.control-button {
    height: 45px;
    cursor: pointer;
    font-family: 'TT Norms', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.control-button:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

/* Styled select dropdown */
.styled-select {
    height: 45px;
    background-color: #84AFFE;
    color: #525B65;
    border: none;
    padding: 0 15px;
    font-size: 16px;
    font-family: 'TT Norms', sans-serif;
    font-weight: 600;
    cursor: pointer;
    border-radius: 25px;
    min-width: 160px;
}

.styled-select:focus {
    outline: none;
    background-color: #6b9bfc;
}

.styled-select option {
    background-color: white;
    color: #333;
    padding: 10px;
}

/* Styled buttons for garage controls */
.styled-button {
    height: 45px;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 16px;
    font-family: 'TT Norms', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    background-color: #005df8;
    color: white;
}

.styled-button:hover {
    transform: translateY(-2px);
    background-color: #0056e0;
}

.refresh-button {
    background-color: #005df8;
    color: white;
    font-family: 'TT Norms', sans-serif;
    font-weight: 600;
}

.refresh-button:hover {
    background-color: #0056e0;
}

.total-price-button {
    background-color: #005df8;
    color: white;
    font-family: 'TT Norms', sans-serif;
    font-weight: 600;
}

.total-price-button:hover {
    background-color: #0056e0;
}

.button-text {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    font-family: 'TT Norms', sans-serif;
    font-weight: 500;
}

.colon-img {
    height: 15px; /* Уменьшено в 2 раза с 30px */
    margin: 0 5px;
}

/* Price display styling with blue background */
.price-display {
    position: relative;
    display: inline-block;
    background-color: #005df8;
    border-radius: 8px;
    padding: 2px 16px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.price-display:hover {
    transform: translateY(-2px);
    background-color: #0056e0;
}

.price-text {
    font-size: 1.0em;
    color: white;
    font-family: 'TT Norms', sans-serif;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    margin: 0;
    padding: 0;
}

/* Main Content */
.garage-main {
    max-width: 1200px;
    margin: 0 auto;
}

/* Cars Grid */
.cars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 20px;
}

/* Car Card */
.car-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.car-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.car-card:hover::before {
    opacity: 1;
}

.car-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

/* Car Image */
.car-image-container {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.car-image {
    max-width: 90%;
    max-height: 1000%;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

.car-image-placeholder {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9em;
    text-align: center;
    border: 2px dashed #ddd;
}

/* Car Details */
.car-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.car-info {
    text-align: center;
    color: #666;
    font-size: 0.98em;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

.car-info p {
    margin: 2px 0;
    font-size: 0.98em; /* Явно устанавливаем размер */
}

.car-info strong {
    font-weight: 700 !important;
    font-family: 'TT Norms', 'Arial', sans-serif !important;
    color: #333 !important;
    font-size: 0.98em !important; /* Явно устанавливаем размер */
}

.car-price {
    font-size: 1.1em !important; /* Увеличиваем размер для цены */
    font-weight: normal;
    color: inherit;
    margin: 2px 0;
}

.car-price strong {
    font-weight: 700 !important;
    font-family: 'TT Norms', 'Arial', sans-serif !important;
    color: #333 !important;
    font-size: 1.1em !important; /* Увеличиваем размер для цены */
}

/* Empty state */
.empty-garage {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 1.2em;
}

/* Logout button outside container */
.logout-container {
    position: absolute;
    top: 5px;
    right: 20px;
    z-index: 1000;
}

.logout-button {
    height: 27px;
    cursor: pointer;
    font-family: 'TT Norms', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.logout-button:hover {
    transform: translateY(-2px) scale(1.05);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

/* Navigation menu */
.nav-container {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

.nav-link {
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-link:hover {
    background: rgba(102, 126, 234, 0.9);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .garage-header {
        gap: 25px;
        flex-direction: column;
        align-items: center;
    }
    
    .header-left {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .cars-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .garage-title {
        font-size: 3em;
    }
}

@media (max-width: 768px) {
    .logout-container {
        top: 5px;
        right: 15px;
    }
    
    .logout-button {
        height: 24px;
    }
    
    .garage-container {
        width: calc(100% - 40px);
        margin: 20px;
        padding: 15px;
    }
    
    .garage-header {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
        align-items: center;
    }
    
    .header-left {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .header-center {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .control-button {
        height: 40px;
    }
    
    .styled-select {
        height: 40px;
        font-size: 15px;
        min-width: 140px;
        padding: 0 12px;
    }
    
    .styled-button {
        height: 40px;
        font-size: 15px;
        min-width: 110px;
        padding: 6px 14px;
    }
    
    .price-display {
        height: 40px;
        padding: 1px 14px;
    }
    
    .cars-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 10px;
    }
    
    .garage-title {
        font-size: 2.7em;
    }
    
    .price-text {
        font-size: 0.9em;
    }
    
    .car-card {
        aspect-ratio: auto;
        min-height: 300px;
    }
}

@media (max-width: 480px) {
    .logout-container {
        top: 2px;
        right: 10px;
    }
    
    .logout-button {
        height: 21px;
    }
    
    .garage-container {
        width: calc(100% - 40px);
        min-height: calc(100vh - 40px);
        margin: 20px;
        padding: 15px;
    }
    
    .garage-header {
        margin-bottom: 20px;
    }
    
    .garage-title {
        font-size: 2.25em;
        letter-spacing: 1px;
    }
    
    .control-button {
        height: 35px;
    }
    
    .styled-select {
        height: 35px;
        font-size: 14px;
        min-width: 120px;
        padding: 0 10px;
    }
    
    .styled-button {
        height: 35px;
        font-size: 14px;
        min-width: 100px;
        padding: 5px 12px;
    }
    
    .price-display {
        height: 35px;
        padding: 1px 12px;
    }
    
    .price-text {
        font-size: 0.8em;
    }
}