/* Reset и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f0f4f8 0%, #d9e2ec 100%);
    min-height: 100vh;
    color: #202124;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Шапка */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: #202124;
    margin-bottom: 15px;
}

.subtitle {
    font-size: 1.3rem;
    color: #5f6368;
    font-weight: 300;
}

/* Секция создания ссылки */
.creator-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.input-group {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

#queryInput {
    flex: 1;
    padding: 18px 25px;
    font-size: 1.1rem;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    outline: none;
    transition: all 0.3s ease;
}

#queryInput:focus {
    border-color: #4285f4;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.primary-btn {
    background: linear-gradient(135deg, #4285f4, #5b9bf8);
    color: white;
    border: none;
    padding: 0 35px;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 133, 244, 0.3);
}

/* Область ссылки */
.link-area {
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-message {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #34a853;
    font-weight: 500;
    margin-bottom: 20px;
}

.success-message .material-icons {
    font-size: 1.5rem;
}

.link-container {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

#generatedLink {
    flex: 1;
    padding: 15px 20px;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #f8f9fa;
    color: #3c4043;
    font-family: monospace;
    overflow-x: auto;
    white-space: nowrap;
}

.button-group {
    display: flex;
    gap: 8px;
}

.icon-btn {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: #4285f4;
    color: white;
    border-color: #4285f4;
}

.hint {
    color: #5f6368;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Секция симуляции */
.simulation-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    display: none;
}

/* Виртуальный курсор */
.virtual-mouse {
    position: absolute;
    pointer-events: none;
    z-index: 100;
    display: none;
    transition: left 0.1s linear, top 0.1s linear;
}

.mouse-cursor {
    width: 32px;
    height: 32px;
    transform: translate(-8px, -8px);
    filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.3));
}

/* Окно браузера */
.browser-window {
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    position: relative;
    background: white;
}

.browser-bar {
    background: #f1f3f4;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.browser-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27ca3f; }

.browser-url {
    flex: 1;
    background: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.9rem;
    color: #5f6368;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.browser-content {
    padding: 40px 20px;
    text-align: center;
    min-height: 450px;
}

.google-logo {
    font-size: 4rem;
    font-weight: 500;
    margin-bottom: 40px;
    font-family: 'Product Sans', Arial, sans-serif;
    letter-spacing: -2px;
}

.g-blue { color: #4285f4; }
.o-red { color: #ea4335; }
.o-yellow { color: #fbbc05; }
.l-green { color: #34a853; }

.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-box {
    border: 2px solid #dfe1e5;
    border-radius: 30px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    height: 60px;
    transition: all 0.3s ease;
    background: white;
}

.search-box:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-icon {
    color: #9aa0a6;
    margin-right: 15px;
}

.search-input {
    flex: 1;
    padding: 15px 0;
    font-size: 1.2rem;
    min-height: 30px;
    text-align: left;
    font-family: monospace;
    color: #202124;
    position: relative;
}

.cursor {
    display: inline-block;
    width: 3px;
    background-color: #4285f4;
    margin-left: 2px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.search-tools {
    display: flex;
    gap: 15px;
    margin-left: 15px;
}

.search-tools .material-icons {
    color: #4285f4;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.2s;
}

.search-tools .material-icons:hover {
    background: #f1f3f4;
}

.search-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 30px;
}

.google-btn {
    background: #f8f9fa;
    color: #3c4043;
    border: 1px solid #f8f9fa;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Roboto', sans-serif;
    min-width: 140px;
}

.google-btn:hover {
    border-color: #dadce0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.google-btn.secondary {
    background: #f8f9fa;
    border-color: #f8f9fa;
}

.google-offer {
    color: #5f6368;
    font-size: 0.9rem;
    margin-top: 20px;
}

.google-offer a {
    color: #1a0dab;
    text-decoration: none;
    margin: 0 8px;
}

.google-offer a:hover {
    text-decoration: underline;
}

/* Элементы управления симуляцией */
.simulation-controls {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
}

.progress-info {
    margin-bottom: 20px;
}

.progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #34a853, #8bc34a);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    color: #5f6368;
    font-size: 0.95rem;
}

.redirect-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #5f6368;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border-left: 4px solid #4285f4;
}

.skip-btn {
    background: #ea4335;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.skip-btn:hover {
    background: #d33426;
    transform: translateY(-2px);
}

/* Подвал */
footer {
    background: #202124;
    color: white;
    padding: 30px 20px;
    margin-top: 50px;
    border-radius: 20px 20px 0 0;
    text-align: center;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
}

/* Эффекты для курсора */
@keyframes clickEffect {
    0% {
        transform: translate(-8px, -8px) scale(1);
    }
    50% {
        transform: translate(-8px, -8px) scale(0.9);
    }
    100% {
        transform: translate(-8px, -8px) scale(1);
    }
}

.clicking {
    animation: clickEffect 0.2s ease;
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .creator-section {
        padding: 20px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .primary-btn {
        justify-content: center;
        padding: 18px;
    }
    
    .link-container {
        flex-direction: column;
    }
    
    .button-group {
        justify-content: center;
    }
    
    .google-logo {
        font-size: 3rem;
    }
    
    .search-box {
        height: 50px;
        padding: 0 15px;
    }
    
    .search-input {
        font-size: 1rem;
    }
    
    .search-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .google-btn {
        width: 200px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    .simulation-section {
        padding: 20px;
    }
    
    .browser-content {
        padding: 20px 10px;
    }
    
    .google-logo {
        font-size: 2.5rem;
        margin-bottom: 30px;
    }
    
    .search-box {
        padding: 0 10px;
    }
    
    .search-tools {
        gap: 8px;
    }
    
    .google-offer {
        font-size: 0.8rem;
    }
    
    .google-offer a {
        display: inline-block;
        margin: 0 4px;
    }
}