body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    background: linear-gradient(45deg, #002a5c, #1a1a1a);
    color: white;
    height: 100vh;
    overflow: hidden;
}

.startup-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: #000;
}

.startup-phase-1 {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(45deg, #1a1a1a, #2a2a2a);
    opacity: 1;
    transition: opacity 1s ease;
}

.startup-phase-1.fade-out {
    opacity: 0;
}

.startup-phase-2 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #006FCD;
    display: none;
    opacity: 0;
    transition: opacity 1s ease;
}

.startup-phase-2.fade-in {
    opacity: 1;
}

.ps-logo {
    width: 200px;
    height: auto;
    opacity: 0;
    animation: fadeIn 2s ease forwards;
}

.ps-header {
    position: absolute;
    top: 30px;
    left: 30px;
}

.ps-logo-small {
    width: 100px;
    height: auto;
}

.welcome-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 36px;
    text-align: center;
    font-family: 'Arial', sans-serif;
}

.click-message {
    font-size: 24px;
    margin-top: 20px;
    opacity: 0.8;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.ps4-interface {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.2);
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-right: 40px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: color 0.2s;
    font-size: 16px;
}

.nav-item:hover {
    color: #4a90e2;
}

.ps-plus-logo {
    width: 24px;
    height: 24px;
    background-image: url('playstation-plus.png');
    background-size: contain;
    background-repeat: no-repeat;
}

.trophy-icon {
    font-size: 18px;
    color: #FFD700;
}

.friends-icon, .profile-icon {
    font-size: 18px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-pic {
    width: 40px;
    height: 40px;
    background: #4a90e2;
    border-radius: 50%;
}

.username {
    font-size: 18px;
}

.time {
    font-size: 18px;
}

.main-content {
    flex-grow: 1;
    padding: 20px;
}

.game-tiles {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 20px;
}

.game-tile {
    text-align: center;
    transition: transform 0.2s;
    cursor: pointer;
}

.game-tile:hover {
    transform: scale(1.1);
}

.game-icon {
    width: 200px;
    height: 200px;
    border-radius: 10px;
    margin-bottom: 10px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.game1 {
    background-image: url('god-of-war.png');
}

.game2 {
    background-image: url('spiderman.png');
}

.game3 {
    background-image: url('horizon.png');
}

.game4 {
    background-image: url('last-of-us.png');
}

.game-title {
    font-size: 16px;
    color: #ffffff;
}

.library {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.library.active {
    display: block;
    opacity: 1;
}

.library-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.library-header h2 {
    margin: 0;
    font-size: 24px;
}

.close-library {
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
}

.close-library:hover {
    color: #4a90e2;
}

.library-content {
    padding: 20px;
    height: calc(100% - 100px);
    overflow-y: auto;
}

.library-section {
    margin-bottom: 40px;
}

.library-section h3 {
    margin-bottom: 20px;
    color: #4a90e2;
}

.library-games {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
}

.library-game {
    text-align: center;
    transition: transform 0.2s;
    cursor: pointer;
}

.library-game:hover {
    transform: scale(1.05);
}

.last-played {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

/* Scrollbar styling */
.library-content::-webkit-scrollbar {
    width: 8px;
}

.library-content::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.library-content::-webkit-scrollbar-thumb {
    background: #4a90e2;
    border-radius: 4px;
}

/* PS Plus Modal Styles */
.ps-plus-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ps-plus-modal.active {
    display: block;
    opacity: 1;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 800px;
    background: linear-gradient(45deg, #1a1a1a, #002a5c);
    border-radius: 15px;
    padding: 30px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.ps-plus-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ps-plus-header .ps-plus-logo {
    width: 40px;
    height: 40px;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
}

.close-modal:hover {
    color: #4a90e2;
}

.subscription-tiers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.tier {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 20px;
}

.tier h3 {
    color: #4a90e2;
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
}

.tier.premium h3 {
    color: #FFD700;
}

.price-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.price-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}

.price-option:hover {
    background: rgba(255,255,255,0.2);
}

.period {
    font-size: 18px;
}

.price {
    font-size: 20px;
    font-weight: bold;
    color: #4a90e2;
}

.tier.premium .price {
    color: #FFD700;
}

.best-value {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #4a90e2;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.tier.premium .best-value {
    background: #FFD700;
    color: #000;
}

.friends-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.friends-modal.active {
    display: block;
    opacity: 1;
}

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

.friends-header .friends-icon {
    font-size: 24px;
    color: #4a90e2;
}

.friends-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    height: 500px;
}

.friends-list {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 20px;
}

.friends-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.friend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.friend-item:hover {
    background: rgba(255,255,255,0.2);
}

.friend-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-size: cover;
}

.friend-name {
    font-size: 16px;
}

.chat-area {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    padding: 10px;
    border-radius: 8px;
    max-width: 70%;
    word-break: break-word;
}

.chat-message.sent {
    background: #4a90e2;
    align-self: flex-end;
}

.chat-message.received {
    background: rgba(255,255,255,0.1);
    align-self: flex-start;
}

.message-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}

.message-info img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.chat-input {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.chat-input input {
    flex-grow: 1;
    padding: 10px;
    border-radius: 20px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: white;
}

.chat-input input:focus {
    outline: none;
    background: rgba(255,255,255,0.2);
}

.chat-input button {
    background: #4a90e2;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

.chat-input button:hover {
    background: #357abd;
}

/* Store Tile Styles */
.store-tile .game-icon {
    width: 300px;
    height: 300px;
    background: #4a90e2;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.store-tile:hover .game-icon {
    background: #357abd;
    transform: scale(1.1);
}

.store-tile .game-icon i {
    font-size: 96px;
    color: white;
}

.store-tile .game-title {
    font-size: 24px;
    margin-top: 15px;
}

.store-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.store-modal.active {
    display: block;
    opacity: 1;
}

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

.store-header i {
    font-size: 24px;
    color: #4a90e2;
}

.store-content {
    height: 500px;
    overflow-y: auto;
}

.store-section {
    margin-bottom: 40px;
}

.store-section h3 {
    color: #4a90e2;
    margin-bottom: 20px;
}

.store-games {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.store-game {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s;
}

.store-game:hover {
    transform: scale(1.02);
}

.store-game .game-icon {
    width: 100%;
    height: 200px;
}

.game-info {
    padding: 15px;
}

.game-info .game-title {
    font-size: 18px;
    margin-bottom: 10px;
    display: block;
}

.game-price {
    color: #4a90e2;
    font-size: 20px;
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}

.buy-button {
    background: #4a90e2;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}

.buy-button:hover {
    background: #357abd;
}

/* Add to the existing scrollbar styling */
.store-content::-webkit-scrollbar {
    width: 8px;
}

.store-content::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.store-content::-webkit-scrollbar-thumb {
    background: #4a90e2;
    border-radius: 4px;
}

/* Update store modal styles */
.store-modal .modal-content {
    width: 90%;
    max-width: 1200px;
    height: 80vh;
    overflow: hidden;
}

.store-content {
    height: calc(100% - 80px);
    overflow-y: auto;
}

.store-games {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 30px;
    padding: 20px;
}

.store-game {
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.2s;
}

.store-game .game-icon {
    width: 100%;
    height: 280px;
}

.game-info {
    padding: 20px;
}

.game-info .game-title {
    font-size: 22px;
    margin-bottom: 15px;
}

.game-price {
    font-size: 24px;
    margin-bottom: 15px;
}

.buy-button {
    padding: 12px 24px;
    font-size: 18px;
}

.store-header {
    margin-bottom: 20px;
}

.store-header i {
    font-size: 32px;
}

.store-header h2 {
    font-size: 32px;
}

/* Add these new styles for the search functionality */
.store-search {
    padding: 20px;
    position: sticky;
    top: 0;
    background: linear-gradient(45deg, #1a1a1a, #002a5c);
    z-index: 1;
    border-radius: 15px 15px 0 0;
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 18px;
    transition: background 0.3s;
}

.search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#searchResults {
    padding: 20px;
}

.search-result {
    animation: fadeIn 0.5s ease-out;
    margin-bottom: 30px;
}

.search-result .game-description {
    color: rgba(255, 255, 255, 0.8);
    margin: 10px 0;
    line-height: 1.4;
}

.search-result .game-genre {
    color: #4a90e2;
    font-size: 14px;
    margin: 5px 0;
    display: block;
}

/* Add loading animation styles */
.loading {
    text-align: center;
    padding: 20px;
    color: #4a90e2;
    font-size: 18px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Add these new styles at the end of the file */
.payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.payment-modal.active {
    display: block;
    opacity: 1;
}

.payment-content {
    padding: 20px;
}

.subscription-info {
    margin-bottom: 30px;
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.subscription-info #selectedPlan {
    color: #4a90e2;
    font-size: 20px;
    margin-top: 10px;
}

.payment-methods {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
}

.payment-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 150px;
}

.payment-method:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-5px);
}

.payment-method.selected {
    background: #4a90e2;
}

.payment-method i {
    font-size: 32px;
}

.payment-form {
    text-align: center;
}

#paymentCode {
    padding: 15px;
    font-size: 20px;
    width: 200px;
    text-align: center;
    margin-bottom: 20px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 10px;
    color: white;
}

#paymentCode:focus {
    outline: none;
    background: rgba(255,255,255,0.2);
}

#confirmPayment {
    background: #4a90e2;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s;
}

#confirmPayment:hover {
    background: #357abd;
}

.payment-error {
    color: #ff4444;
    margin-top: 10px;
    font-size: 16px;
}

.payment-success {
    text-align: center;
    padding: 30px;
}

.payment-success i {
    font-size: 64px;
    color: #28a745;
    margin-bottom: 20px;
}

.payment-success h3 {
    color: #28a745;
    margin-bottom: 10px;
}

.store-header {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: space-between;
}

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

.cart-icon {
    font-size: 24px;
    color: #4a90e2;
    cursor: pointer;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-modal.active {
    display: block;
    opacity: 1;
}

.cart-content {
    padding: 20px;
}

.cart-items {
    margin-bottom: 30px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-title {
    font-size: 18px;
    margin-bottom: 5px;
}

.cart-item-price {
    color: #4a90e2;
    font-size: 16px;
}

.remove-from-cart {
    background: #ff4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.remove-from-cart:hover {
    background: #cc0000;
}

.cart-summary {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 20px;
}

.cart-total {
    font-size: 24px;
    margin-bottom: 20px;
}

.cart-total-amount {
    color: #4a90e2;
    font-weight: bold;
}

.checkout-button {
    background: #4a90e2;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 18px;
    width: 100%;
    cursor: pointer;
    transition: background 0.2s;
}

.checkout-button:hover {
    background: #357abd;
}

.empty-cart {
    text-align: center;
    padding: 40px;
    color: rgba(255,255,255,0.7);
    font-size: 18px;
}

.library-tile .game-icon {
    width: 300px;
    height: 300px;
    background: #4a90e2;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.library-tile:hover .game-icon {
    background: #357abd;
    transform: scale(1.1);
}

.library-tile .game-icon i {
    font-size: 96px;
    color: white;
}

.library-tile .game-title {
    font-size: 24px;
    margin-top: 15px;
}

/* Update library modal styles */
.library {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.library.active {
    display: block;
    opacity: 1;
}

.empty-library {
    text-align: center;
    padding: 40px;
    color: rgba(255,255,255,0.7);
    font-size: 18px;
}

.empty-library {
    text-align: center;
    padding: 40px;
    color: rgba(255,255,255,0.7);
    font-size: 18px;
}

/* Add new styles for game modal */
.game-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-modal.active {
    display: block;
    opacity: 1;
}

.game-modal .modal-content {
    width: 90%;
    max-width: 800px;
    height: 80vh;
    background: linear-gradient(45deg, #1a1a1a, #002a5c);
    border-radius: 15px;
    padding: 30px;
}

.game-content {
    height: calc(100% - 60px);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#gameScene {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.scene-description {
    font-size: 18px;
    line-height: 1.6;
    color: #fff;
    background: rgba(0,0,0,0.3);
    padding: 20px;
    border-radius: 10px;
    min-height: 100px;
}

.choices-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.choice-button {
    background: rgba(74, 144, 226, 0.2);
    border: 1px solid #4a90e2;
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 16px;
}

.choice-button:hover {
    background: rgba(74, 144, 226, 0.4);
    transform: translateX(10px);
}

.game-button {
    background: #4a90e2;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s;
    width: 200px;
    margin: 0 auto;
    display: block;
}

.game-button:hover {
    background: #357abd;
}

.loading {
    text-align: center;
    color: #4a90e2;
    font-size: 18px;
    padding: 20px;
    animation: pulse 1.5s infinite;
}